Not totally sure how to approach this. I\'ve researched a bit but I\'ve come up short. Trying to connect to the network drives at work and copy out the newest folder (update
You can try with something like this (specifying access rights for the network share ):
string updir = @"\\NetworkDrive\updates\somefile";
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
WindowsIdentity identity = new WindowsIdentity(username, password);
WindowsImpersonationContext context = identity.Impersonate();
File.Copy(updir, @"C:\somefile", true);