C# File.Copy source and destination folders requiere different user rights
问题 I have an application that copies files that could be located anywhere on the local hard drive to a directory on a network share. The network directory is only accessible for a special domain account. I generally solved the problem by using an Impersonator-Class in this way: using(new MyImpersonator() { File.Copy(source, destination); } But this causes problems when I want to copy a file from a special directory, for example the Windwos-Dektop. Then I get an UnauthorizedAccessException