0

I have a UNC folder added in my machine using "Add Network Places" option in "My Network Places" (XP). I need to select the specific unc folder through my C# "folderBrowser Dialogue." However,as unc path is password protected. While selecting the same,how can I prompt for userCredentials. can anyone have thoughts on this...

Anees
  • 885
  • 4
  • 13
  • 31

1 Answers1

1

PInvoke to WNetAddConnection2 and pass the CONNECT_INTERACTIVE flag to allow the OS to pop a username/password prompt if necessary. You can get the PInvoke definition here.

nitzmahone
  • 13,720
  • 2
  • 36
  • 39