I hope this isn't oo trivial question, but when I call System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() I'm getting back a lower case user ID, but other dev's are getting an upper case user ID. How can I force ystem.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() to return an upper case string?
Try
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString().ToUpper()
UPDATE!! I still have not completely answered my question, but I have a clue. When System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString() is called from my ASP.Net app when running within IIS I get a User ID with all caps. When I call this line from my asp.net app from within the vs.net web server my ID is in lower case.
Thanks for the response with the ToUpper() code, but I checked the production code and thatis not used.
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