Riples
Riples

Reputation: 1157

Can I Show Windows Authentication Dialog When Trying To Connect To Un-Authenticated Network Path

In my application, it allows users to remotely connect computers and folders within the internal network for troubleshooting, etc.

My problem is that some of these computers that they are trying to connect to haven't yet been authenticated for them, so when I plug the UNC path into a new process for explorer, it doesn't error but simply returns some random local folder (My Documents I think).

My question is... Is there a way I can make a call to the windows authentication dialog to allow the user to authenticate against the remote PC? If the user simply enters the same address into a normal explorer window, the authentication screen will appear, however, using my app it doesn't.

Is there anyway I can force this to show up for the user?

Any help appreciated, thanks.

Upvotes: 2

Views: 1134

Answers (1)

Victor Zakharov
Victor Zakharov

Reputation: 26434

Based on this discussion:

You can have a look at CredUIPromptForCredentials API, in vb.net, just P/Invoke it. For more information:

http://www.pinvoke.net/default.aspx/credui/CredUIConfirmCredentials.html http://msdn.microsoft.com/en-us/library/aa375177(VS.85).aspx

Upvotes: 1

Related Questions