string fileName = "image.jpg"; string source = "c:\photos\" + fileName; string destination = "\\172.16.242.41\photos\" + fileName; File.Copy(source, destination);
using ( new Impersonator( "myUsername", "myDomainname", "myPassword" ) ) { // code that executes under the new context. File.Copy(source, destination); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)