How to show the user a default windows authentication request from a windows form using C #?

I thought this would be a very common practice, but I find it difficult to find anything to show the user a standard default Windows authentication account in C #?

Users will use this Windows forms application to connect to a web service in another domain, so I cannot just pass the default credentials. These users will have a separate login to access the web service, and I want them to be prompted at the Windows prompt by default, and then I can pass their requests through the web service.

Thanks!

+4
source share
2 answers

To this answer I replied, I will return. You can use the credential management API. Here is a link with sample code that should run you.

+2
source

You need P / invoke CredUIPromptForWindowsCredentials in Vista and later, or CredUIPromptForCredentials in XP.

+2
source

All Articles