you can use simply the following statement :
HttpContext.Current.User.Identity.Name
문제
I am building a web application for my school's intranet. Whenever teachers try to access the browser to access the intranet page a popup appears so they can login, in my page I need to get the logged username. do any of you guys know how to do that?
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
The code above is what I've managed to do so far which gets the username of the user loggin in on windows but that's not really what I want.
해결책
you can use simply the following statement :
HttpContext.Current.User.Identity.Name