Click here to Skip to main content
15,895,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

I'm tring to use the Impersonator class to copy a file from a PC to a server in another domain (without trust), but I receive the error in the object.
C#
using (new Impersonator("username", "domain", "password"))
 {
 File.Copy(@"C:\Temp", targetPath);
 }

in detail the issue is related to the LogonUser().
I have the right credential to connect to this server\domain.

Does someone know how fix this problem?

Thanks,
Andrea
Posted
Updated 8-Oct-12 1:12am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900