IIS Anonymous authentication account vs Application pool account

iiswindows-server-2008

Can someone explain me what these 2 accounts are used for?

I know that the application pool account controls the permission that apply to .NET code of a website.

If this account has no write permission to a directory then you can't create files for example.

However there is one more account IISUSR which is the account for anonymous authentication.

In what way does this account relate to the .NET code and access to a website?

Why do we need 2 accounts?

Best Answer

The IIS_Anonymous account is the the account that the user accessing the site runs as. So you want to make sure that this user can't access any files outside of the web root and files with sensitive information IE sql connection strings etc. You generally don't want to allow this user write access anywhere.

The App pool account is the account your app (or the IIS server) runs under. You want to give this account the bare minimum access it needs to run your script. If you are security conscious you will create different app pools for each site, so that a security misconfiguration on one site will not leak to another.

Related Topic