We have an active directory domain (let's call it foodomain
) and a domain user account (foodomain\fooAppPoolUser
) used for the IIS application pool identity.
We want to run the app pool under this user account and not under Network Service
or the new AppPoolIdentity
as we have to access SQL server and have multiple applications on IIS (with own app pools) accessing different databases.
The problem is that I can't find a clear HOW-TO explaining, which user rights have to be set for this user account and how IIS has to be setup so that this will work.
First I got errors (unfortunately I can't remember which ones), then I added fooAppPoolUser
to the local admin group (Administrators
, I know, was only to test), then it worked. Now I removed the user again, restarted IIS and it still works.
So I'm confused a bit and would like to know, how the configuration/setup has to be to have it working.
Somwhere I read, that the account needs to have the "Impersonate a client after authentication" user right. That's the reason I added the account to the Admin group (the user rights assignment is blocked via group policy, but this can for sure be changed if really needed.
I hope I was clear enough what the question is and hope somebody has an answer.
Application Pool Identity Accounts It doesn't require a password and has only user privileges; that is, it is relatively low-privileged. Running as a low-privileged account is a good security practice because then a software bug can't be used by a malicious user to take over the whole system.
You can change which user account is being used by right clicking “Application Pool” > Advanced Settings > Under “Identity”, you can click the “…” and look for a different user account. You can either choose any of the service accounts on the server, or choose a specific user to run a specific application.
It's frustrating that this information is so hard to find, since some security admins seem to enjoy the cruel and unusual punishment of changing default policy settings to thwart installing apps within IIS.
Here's what I believe you should do to enable an account to work as an ApplicationPool identity:
aspnet_regiis -ga DOMAIN\USER
to add permissions to access the IIS Metabase. (Exactly what that means, who knows?) aspnet_regiis reference
IIS_IUSRS
group. This may be done automatically depending on the IIS configuration setting processmodel.manualGroupMembership but easiest to add it yourself. Negotiate
) then depending on the URL and if kernel-mode auth is on you might need to set up an SPN. I suggest switching to NTLM if possible. Otherwise, see articles below about SPNs and find a friendly domain admin to add them for you. Fun reading:
The reason why you application worked AFTER removing Administrator rights is that your application was compiled to the Framework temp folder using the administrator rights - Your application worked after removing the administrator rights because the application was compiled. If you update your application and it requires recompilation, the app pool account will need trusts again.
First I got errors (unfortunately I can't remember which ones), then I added fooAppPoolUser to the local admin group (Administrators, I know, was only to test), then it worked. Now I removed the user again, restarted IIS and it still works.
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