Adam Berent
Adam Berent

Reputation: 2032

ASP.NET Windows Authentication Impersonation

I am trying to figure out how to implement an ASP.NET page with Windows Authentication without getting that annoying IIS login box.

I currently have 3 domains in my network so all the people logging in would have to prefix their user names with the domain. This is not user friendly. I would like to have a custom login page that would have a domain combo box.

Most examples I found implement this using Form security, however I need Windows Authentication since I want to connect to the SQL server using Integrated Authentication rather than a hard coded user name and password.

Does anyone know of a good article or sample code that shows how to implement this?

Upvotes: 0

Views: 1008

Answers (2)

Phaedrus
Phaedrus

Reputation: 8421

The following links to an article that explains how to authenticate a windows user using forms authentication, it uses a call to the native win32 api function LogonUser to acheive this. This way you can design your own custom login page with a drop down list to select a domain. Take a look, perhaps it will help.

Windows Authentication using Form Authentication

Upvotes: 1

kemiller2002
kemiller2002

Reputation: 115538

To get this setup so you don't have the authentication prompt, you are going to need to have the domains trust the accounts from one another. This article should get you pointed in the right direction:

http://technet.microsoft.com/en-us/library/cc787646%28WS.10%29.aspx

Upvotes: 0

Related Questions