Copy files to a shared folder with User /pass

  • Thread starter Thread starter =?iso-8859-1?B?ROFtYXNvIFZlbOF6cXVleiDBbHZhcmV6?=
  • Start date Start date
?

=?iso-8859-1?B?ROFtYXNvIFZlbOF6cXVleiDBbHZhcmV6?=

Hi,

I need to copy files to a shared folder protected by username/password.
I don't now autenticate me in the server to copy the files.

Do I need to use the credentials to do it?
How can i do it?

Anybody can help me?

Thanks.
 
Dámaso,

Check the documentation for the WindowsIdentity class, specifically, the
Impersonate method. There is code there that will show you how to login as
another user. Once you do this, you can login as a user that has the
appropriate permissions, and then perform the copy operation.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top