No specifics in the question so I will be general with my answer.
In IIS you need to make sure you are using windows authentication on the website.
In the code behind you can get the users login credentials using
strUserName = Right(Context.User.Identity.Name.ToString, Len(Context.User.Identity.Name.ToString) - InStr(Context.User.Identity.Name.ToString, "\"))
If you are using SQL Server you can even interogate the AD using a linked server and stored proc.....
If you link to ADSI you should be able to use something like this to list out the domain users to a list
select givenName, sn, objectguid from openquery
(
ADSI,'SELECT givenName, sn, objectguid, scriptpath
FROM ''LDAP://domain.com''
WHERE objectCategory = ''Person'' AND objectClass = ''user'''
)
WHERE givenName IS NOT NULL and sn IS NOT NULL
order by sn
In full. If you wanted to check if some user was part of a user group then you could use code like this....(Where Check AD Member is a stored proc in the DB against ADSI)
strUserName = Right(Context.User.Identity.Name.ToString, Len(Context.User.Identity.Name.ToString) - InStr(Context.User.Identity.Name.ToString, "\"))
Dim param(1) As SqlClient.SqlParameter
param(0) =
New SqlClient.SqlParameter("@SAMAccountName", strUserName)param(1) = New SqlClient.SqlParameter("@SecurityGroup", "CN=SecurityGroup,CN=Users,DC=DOMAIN,DC=com")
If SqlHelper.ExecuteReader(ConfigurationSettings.AppSettings("CONNECTIONSTRING"), CommandType.StoredProcedure, "CheckADMember ", param).HasRows Then
blnResult =
True
Else
blnResult =
False
End If
==========================
There you go. General, but I hope it helps in some way. Google "ADSI linked server" for some more help on using the active directory from SQL Server
Cheers