Uppercase from System.Security.Principal.WindowsIdentity.GetCurrent (). Name.ToString ()?

I hope this is not a reservation, but when I call System.Security.Principal.WindowsIdentity.GetCurrent (). Name.ToString () I am returning the lowercase user id, but other developers get the uppercase user id. How can I force ystem.Security.Principal.WindowsIdentity.GetCurrent (). Name.ToString () return uppercase string?

+3
source share
4 answers

Try

System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString().ToUpper()
+1
source

Add .ToUpper()after.ToString()

0
source

UPDATE!! , . System.Security.Principal.WindowsIdentity.GetCurrent(). Name.ToString() ASP.Net IIS, . asp.net - vs .net, .

ToUpper(), .

0

Windows, : maurice, Maurice, MaUrIcE MAURICE .

This is the name when he typed it , which returns WindowsIdentity.GetCurrent().Name(). You can confirm this by typing your user ID in an unusual case and blocking the workstation; The display name will display what you typed, and not your user ID, since it was created.

0
source

Source: https://habr.com/ru/post/1739896/


All Articles