asp.net - Getting currently logged in user from AD ( Instead of NT AUTHORITY/NETWORK SERVICE ) -
I have AC # asp.net web application where I currently have to get a signed user (Windows certification - Active Directory)
I changed authentication to ISS (7.5) for Windows authentication and prevented anonymous access to web.config
However when I read "System.Security.Principal.WindowsIdentity. GetCurrent () "I can not find my user credentials, but NTP Authority / Network Service.
I have tried to use my account for the ACE pool (just for testing), but it only spoils the exemption.
Any What can I do to get my user credentials?
System security. Principal.indoindentity.GetCurrent ()
returns the identity of the account running as a web application.
HttpContext.Current.User.Identity
Returns the identity of the logged in user, you can simply User.Identity
. In doubt, read the documentation!
I have AC # ASP I net web application where I currently Sign-in user (Windows authentication - Active Directory) is required to get
I have changed authentication for Windows authentication in the ISS (Authentication) and the Web Unknown access to configs has stopped
However, when I use "System.Security.Principal.WindowsIdentity.GetCurrent ()", I do not get my user credentials, but NT AUTHORITY / NETWORK SERVICE .
I tried to use my account for the application pool (just for testing), but it only spoils the reduction.
Any ideas what I can do to get my user credentials?
system. Security. Principal. WindowsIndentity.Gate Current ()
returns the identity of the account running as a web application.
HttpContext.Current.User.Identity
Returns the identity of the log In the user often, you can simply User.Identity
. In doubt, read the documentation!
Comments
Post a Comment