I've been having the same issue in one of our in-house web application as
well: Yes it shows your proper AD credentials on the application but when
the server passes these credentials to the AD controller, that's where it
gets confused.
From the articles I've found it appears this is a classic double-hop issue
when the iis 6 server tries to pass on your credentials to the ad domain
controller. The only workaround we found was to create a very low-security
AD account that we have encrypted the username and password for, and tossed
these credentials into a text file (in the application's directory) for our
application to use.
If you find another solution please share it as I know there are a few
people who'd like to know.
Note: Even nesting AD impersonation with the following code doesn't seem to
alleviate the double-credential hop/passing.
'Impersonate the windows user running the application
Dim impersonationContext As
System.Security.Principal.WindowsImpersonationCont ext
Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity
currentWindowsIdentity = CType(User.Identity,
System.Security.Principal.WindowsIdentity)
impersonationContext = currentWindowsIdentity.Impersonate()
Try
'Gather User's username, authentication type and if the user
'is actually authenticated.
Dim p As IPrincipal
Dim i As System.Security.Principal.IIdentity
Dim isAuthenticated As Boolean
Dim authenticationType As String
p = System.Threading.Thread.CurrentPrincipal
i = p.Identity
isAuthenticated = CType(p.Identity.IsAuthenticated, String)
authenticationType = p.Identity.AuthenticationType
ADUserName = p.Identity.Name.Split("\"c)(1)
'Put code here under the current logged-in user
'...
'...
Catch ex As Exception
Response.Write(ex.Message)
End Try
'End impersonation
impersonationContext.Undo()
"Chris Gatto" <cg****@nbnet.nb.ca@removeme> wrote in message
news:u9**************@TK2MSFTNGP12.phx.gbl...
Hi,
I'm having what should be a minor problem but has turned into a 2 day slug
fest with ASP.Net. I am simply attempting to authenticate my asp.net
application users against users in an AD group set up on our domain. It
seems to me I am missing something very simple and obvious, but none of
the MSDN articles I have read are indicating what this might be.
My setup is ASP.Net running on a Windows 2003/IIS 6 server. IIS security
settings are set to Integrated Windows Authentication only.
My web.config details are:
<authentication mode="Windows" />
<authorization>
<allow roles="domainname\groupname" />
<deny users="*" />
</authorization>
<identity impersonate="true" />
The problem is that:
1) the application is challenging for a login id/password, and
2) will not authenticate the user even though the credentials supplied
coorespond to an existing user in the specified AD group;
BTW: providing an allow users="domainname\username" works just fine.
Thanks in advance for the help.