Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do File Operations for a Praticular User only ?

Status
Not open for further replies.

vinidel

IS-IT--Management
Jan 23, 2004
78
US
Hi All,

I have a vb.net application that copies/ moves pictures to the file directory on network drive. I do not want my users to go directly to the file directory and modify or rename any picture/ file. I want them to use this vb.net application only for making any changes to the pictures/files on the network drive.

My system administrator can change the right on this folder on the network drive to read only for all users and can create a dummy user who will have read/ write permissions on the network folder.

My question is what I need to do in VB.NET application so that this dummy user name and password is used for moving or copying files to and from this network folder.

Any suggestions or advice or code snippets will be very useful and will be appreciated.

Thanks,

vinidel
 
Check out this thread:

thread796-1398809

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Thanks jebenson for guiding me to the thread with the solution. I found another link from this thread that leads to the example by using AliaAccount class.

Here is the link:

When I run the example on my machine and impersonating another user it works fine but when I use it for another machine on the network it fails.

Impersonation of domain\user failed! [1326] Logon failure: unknown user name or bad password.

I don't know if this is an issue, but this is a network share I am trying to access by using the impersonate. Any thoughts/pointers on this?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top