Question : Get USERNAME when using windows authentication

I have an intranet only .net app and I want to get the user name of the user using the app.
I have set the web config to <authentication mode="Windows"/>
In IIS under Authentication it says that everything is disabled except Windows Authentication.
I am using:
Session("UserName") = System.Security.Principal.WindowsIdentity.GetCurrent().Name
in my Master page's page load event to get the username but all it returns is
NT AUTHORITY\NETWORK SERV which is obviously not what I expected.
What am I doing wrong here?
 

Answer : Get USERNAME when using windows authentication

>> do I have to repeat "siWinterExams.csName = "George"" for ALL 3 entries if I want the name George to be associated with his 3 scores?

No. What's stored in the vector are three separate copies of the siWinterExams struct, each taken at a different instant. All three will have the same csName, but a different nTestScore.
Random Solutions  
 
programming4us programming4us