tags:

views:

612

answers:

1

Hi,

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...

+1  A: 

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