I'm using WindowsIdentity to get the current user's ID to do SSO. For the most part, I'm getting exactly what I want, but for some users I'm getting odd results. Example code:
IIdentity WinId = HttpContext.Current.User.Identity;
WindowsIdentity wi = (WindowsIdentity)WinId;
String idName = wi.Name.Replace(@"TESTHQ\", "");
Sometimes I get [email protected]
and I'm then able to sign in. Other times I get [email protected]/[email protected].
Is there a place where I can see the current identity using Windows 7? Like in Control Panel or something?
Thanks!
Then you can change your code to split the values on /
try
WindowsIdentity MyIdentity = WindowsIdentity.GetCurrent();
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