I made a spelling mistake when I created an account a few weeks back. I changed the account and they can log onto the domain with the new name. However we have a web application in house that is still picking up the wrong name.
The .net application uses
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Which gives the old name.
If I use
Environment.UserName
I get the correct new name. What did I miss in the AD? Is there somewhere I can change the name which will result in System.Security.Principal.WindowsIdentity.GetCurrent().Name; giving the correct name?
I have no experience with .net so I'm very sorry if the question has an obvious answer.
Check out here for the Answer:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/27e42d4a-6452-4840-bbf2-abbc16e22557
Add the Key:
"HKLM/System/CurrentControlSet/Control/Lsa/LsaLookupCacheMaxSize=0"
To your registry as this is cached. I don't think restarting IIS will fix this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With