I am trying to get started with using IIS. I created a new site on IIS Manager, mapped it to a folder on my file system and added index.html to the folder. I have set the po
Here is what worked for me.
To set the server anonymous to inherit from the app pool identity do the following..
If you are working with Application Pool authentication (instead of IUSR), which you should, then this list of checks by Jean Sun is the very best I could find to deal with 401 errors in IIS:
Open IIS Manager, navigate to your website or application folder where the site is deployed to.
Run the following command:
icacls <path_to_site> /grant "IIS APPPOOL\<app_pool_name>"(CI)(OI)(M)
For example:
icacls C:\inetpub\wwwroot\mysite\ /grant "IIS APPPOOL\DEFAULTAPPPOOL":(CI)(OI)(M)
Especially steps 5. & 6. are often overlooked and rarely mentioned on the web.
Since you're dealing with static content...
On the folder that acts as the root of your website- if you right click > properties > security, does "Users" show up in the list? if not click "Add..." and type it in, be sure to click "Apply" when you're done.
TL;DR;
In most cases, granting access to the following account(s) (one|both) will be enough:
with Access Rights:
That's it!
Read on for a more detailed explanation...
Grant access to the web application folder's ACL depending what is selected in the pic above:
IUSR
(in my case) + IIS AppPool\DefaultAppPool
IIS AppPool\DefaultAppPool
onlyIIS AppPool\DefaultAppPool
account is the default AppPool account for new IIS web applications, if you have set a custom account, use the custom one.
Give the following permissions to the account(s):
Read & Execute
List folder contents
Read