How do I get the identity of an appPool programmatically in C#? I want the application pool user and NOT the user who is currently logged in.
Application pools in Internet Information Services (IIS) is a mechanism designed to comprise a group of web applications corresponding to one or more worker processes (w3wp.exe) sharing a common configuration.
You could use System.Security.Principal.WindowsIdentity.GetCurrent().Name
to identify the Identity in which the current application is running. This link provides a nice utility which displays the identity under which the aspx is run.
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