I am looking for a way to use Active Directory to limit access to a web page. I am not just looking for the "if the account exists, then the user is authenticated". I need to use custom authentication methods.

I know that I can set a property in IIS that will prompt the user for their domain user name and password using the standard Windows username/password popup. Is it possible to get the information that they enter into those boxes(just the domain\username is fine) and use that to authenticate?

I have a database table that contains a list of users with an "Admin" flag as part of the table. I need to use the domain username to query the table to see if the user has the "Admin" flag set to true. Is this possible?

Using .Net 2.0 and C#.