开发者

C# -Connect unc path with credentials

I have a UNC folder added in my machine开发者_Go百科 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...


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜