Last post Sep 26, 2013 07:23 PM by kouts1
Sep 24, 2013 05:28 PM|kouts1|LINK
I am stumped and looking for ideas.
We just changed a user's name in AD and now she cannot authenitcate properly via a web app. She was able to before the name change w/o any issues.
It now shows "Null" on the username label of the web page. Everyone else is fine except her. If I debug, it shows:
She is currently in the "eAdmins" group. Always has been, even before the name change. I even removed and added her back, still no luck.
The auth code that is being used is the following:
Public Function IsMemberOfGroup(userName As String) As Boolean
Dim isMember As Boolean = False
Using rootContext As New PrincipalContext(ContextType.Domain, "domain", "username", "pass")
Using groupPrincipal__1 As GroupPrincipal = GroupPrincipal.FindByIdentity(rootContext, "eAdmins")
Using userPrincipal__2 As UserPrincipal = UserPrincipal.FindByIdentity(rootContext, IdentityType.SamAccountName, userName)
If groupPrincipal__1 IsNot Nothing AndAlso userPrincipal__2 IsNot Nothing Then
' Check if the user is a member of the group.
'isMember = userPrincipal.IsMemberOf(groupPrincipal);
isMember = groupPrincipal__1.GetMembers(True).Contains(userPrincipal__2)
isMember = False
I checked her account and everything looks ok. The only thing I see via ADSI edit is the LegacyExchangeDN is showing her old username. besdies that, everything is working. She is able to login to her PC w/o issues. Logs onto SharePoint and can access network
resources, sends/receives email etc... Could there be a bug in system.directoryService.accountmanagement that could be causing this? Again, so far It seems that she is the only person that is having the problem. Has anyone else encountered something like
this before? Any help would be greatly appreciated.
Sep 25, 2013 04:28 AM|smirnov|LINK
Try to reboot the web server (Windows). It's possible that the old name was cached. It is also possible that the domain controller your web servers are talking to have not picked up the replication of the name change yet. So, if reboot didn't help, check
if DC has been replicated properly.
Sep 26, 2013 07:23 PM|kouts1|LINK
Yep, that was it. Rebooted the server and all is well! Can't believe I didn't think of that. Thanks for the help!!