1

When I try to access to an image on another computer via Windows Explorer I get the following message:

Windows Security

This is because my local user credentials are not registered on the remote computer. That's Ok.

But when I use File.Copy method in my C# application I get the "Logon failure: unknown user name or bad password" exception message. Does it possible to programmatically invoke the above message so a user might enter his credentials and then proceed with Copying the file.

Murat Korkmaz
  • 1,329
  • 2
  • 19
  • 37
  • Possibly related: http://stackoverflow.com/questions/766033/copy-file-to-remote-computer-using-remote-admin-credentials – ta.speot.is May 31 '13 at 08:15
  • #ta.speot.is: I need to invoke a system Window, where a user can input his credentials, but the topic you suggested me points me to a solution where I need to ask for a user/password manually. Plus if a a user already had connected to a remote computer the File.Copy and File.Exists functions will work without entering user's credential (I guess Windows caches this in someway) – Murat Korkmaz May 31 '13 at 08:55
  • Well just invoke it then http://msdn.microsoft.com/en-us/library/windows/desktop/ms717794(v=vs.85).aspx – ta.speot.is May 31 '13 at 09:00

0 Answers0