applicationpoolidentity

Get the Application Pool Identity programmatically

喜你入骨 提交于 2019-11-27 01:32:55
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. adt 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. You need to make a reference to Microsoft.Web.Administration (in Microsoft.Web.Administration.dll). Microsoft.Web.Administration.dll is located in C:\Windows\System32\inetsrv. //Add this to your using statements: using

IIS 7.5 application pool uses wrong %APPDATA% for custom user as identity

你离开我真会死。 提交于 2019-11-26 17:48:12
问题 I want my MVC3 web application to access %APPDATA% (e.g. C:\Users\MyUsername\AppData\Roaming on Windows 7) because I store configuration files there. Therefore I created an application pool in IIS with the identity of the user "MyUsername", created that user's profile by logging in with the account, and turned on the option "Load User Profile" (was true by default anyway). Impersonation is turned off. Now I have the problem that %APPDATA% (in C#): appdataDir = Environment.GetFolderPath

IIS application using application pool identity loses primary token?

眉间皱痕 提交于 2019-11-26 11:57:28
问题 (This is a question about a vague problem. I try to present all relevant data, in the hope that someone has helpful information; apologies for the long description.) Our web app We have a .NET 4 web application running in IIS 7.5 accessing Active Directory and a SQL Server database. This web application is running under a virtual \'app pool identity\', by setting the Identity of the application\'s application pool to ApplicationPoolIdentity. A concise description of virtual identities can be

Get the Application Pool Identity programmatically

百般思念 提交于 2019-11-26 09:41:13
问题 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. 回答1: 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. 回答2: You need to make a reference to Microsoft.Web.Administration (in Microsoft.Web.Administration.dll). Microsoft