Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the Application Pool Identity programmatically

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.

like image 872
p0enkie Avatar asked Apr 11 '12 06:04

p0enkie


People also ask

What is the application pool in IIS?

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.


1 Answers

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.

like image 159
adt Avatar answered Oct 02 '22 16:10

adt