I want copy my file to another machine in network using c#.net. can any one please help me with it
thanks Swati ail
I want copy my file to another machine in network using c#.net. can any one please help me with it
thanks Swati ail
Jump to PostUse File.Copy(), it can recognize mapped drives as well as UNC paths.
Use File.Copy(), it can recognize mapped drives as well as UNC paths.
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
WindowsIdentity idnt = new WindowsIdentity("administrator","admin" );
WindowsImpersonationContext context = idnt.Impersonate();
context.Undo();
File.Copy(@"D:\filename.text", @"\192.168.2.14\temp\filename.text", true);
while personifing m getting error
"The name provided is not a properly formed account name."
why am i getting this error. I have given correct user name and password
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.