HttpContext.Current.User.Identity.Name returns wrong user name

G

Guest

We have an active directory user that just had her username renamed.
When the user is running an application that calls our CurrentUser web
service method (which returns the value of
HttpContext.Current.User.Identity.Name), her old username is returned.
DOMAIN\oldusername instead of DOMAIN\newusername. The user is logged in with
this new username and when we make a windows client .NET call to
System.Security.Principal.WindowsIdentity.GetCurrent.Name it returns the
correct username "DOMAIN\newusername".

This has stumped the developers and our network admins. Can anyone point us
in the right direction or do we have to call Microsoft? It has not resolved
itself in 4 days now.

Hopefully someone will be so kind to share some information if they have it.

<WebMethod()> _
Public Function CurrentUser() As String
'Returns current user identity
Return HttpContext.Current.User.Identity.Name
End Function
 
Joined
Jun 29, 2011
Messages
1
Reaction score
0
This is likely your problem:
http://support.microsoft.com/kb/946358

The LsaLookupSids function is likely returning the old usernam because the LsaLookupCache is stale.

Either a reboot, or setting the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\LsaLookupCacheMaxSize to DWORD 0 will fix your problem.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top