IIS - 401.3 - Unauthorized

前端 未结 10 1672
深忆病人
深忆病人 2020-12-12 14:44

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

10条回答
  •  离开以前
    2020-12-12 15:16

    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.

    1. Open Advanced Settings (it's on the right hand Actions pane).
    2. Note down the Application Pool name then close this window
    3. Double click on the Authentication icon to open the authentication settings
    4. Disable Windows Authentication
    5. Right click on Anonymous Authentication and click Edit
    6. Choose the Application pool identity radio button the click OK
    7. Select the Application Pools node from IIS manager tree on left and select the Application Pool name you noted down in step 3
    8. Right click and select Advanced Settings
    9. Expand the Process Model settings and choose ApplicationPoolIdentityfrom the "Built-in account" drop down list then click OK.
    10. Click OK again to save and dismiss the Application Pool advanced settings page
    11. Open an Administrator command line (right click on the CMD icon and select "Run As Administrator". It'll be somewhere on your start menu, probably under Accessories.
    12. Run the following command:

      icacls  /grant "IIS APPPOOL\"(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.

提交回复
热议问题