Our client's site presently uses forms authentication, so customers must see the login page to key in their password. You will find custom membership and role companies that access a database through NHibernate to obtain customers and roles.

The customer now wants customers from inside the neighborhood Active Directory to obtain drenched in instantly. Particulars of customers and roles should be retrieved in the same database as before. You will see a brand new area put into the Customers table that holds an energetic Directory username to ensure that I'm able to match it up with.

When the current user isn't authenticated through Active Directory or no record within the Customers table includes a matching Active Directory title they would must see the login page normally. To become obvious: the website must be accessible externally (i.e. outdoors the domain).

I've got a test system setup which involves an IIS 6 server along with a client running IE7 both of them are people of the test Active Directory. I have attempted using HttpContext.Current.Request.LogonUserIdentity in conjunction with IIS integrated security but it is coming back the anonymous login except when browsing on localhost.

Does anybody possess a solution?

You need to take a look at Integrated Home windows Authentication. This can permit the Active Directory password (hashed) to become sent over the network towards the server. When they pass you are able to redirect these to the website, and when not, push these to the login page.