We have a situation where we have been merged with another organisation and as part of that our sid history has been migrated to the new common active directory.
However, our understanding was that as part of the sid history migration when we use this method
httpcontext.current.identity.name
It would return the old domain name even though you have logged onto the pc with the new domain name because of the sid history
We are using internet explorer and the credentials returned are for the new domain e.g. instead of abc\d (old domain), its returning def\d (new domain).
Is there anything we have done incorrecly here or can do something to fix this? We are using IIS Windows Authentication on IIS 10 with Windows Server 2016.
We have been using the Quest Migration tool.
Can we enable something rather than change the code?
The command
httpcontext.current.identity.name
is based on authentication. In your case, Windows authentication. That means it will show who is currently logged in. Not who was logged in the past at some arbitrary point in history.SOURCE: https://learn.microsoft.com/en-us/dotnet/api/system.web.httpcontext.user?redirectedfrom=MSDN&view=netframework-4.7.2#System_Web_HttpContext_User
SEE ALSO: How does HttpContext.Current.User.Identity.Name know which usernames exist?