IIS 10 Windows Server 2019 - 403 - Forbidden: Access is denied when accessing ASP.NET MVC site

Viewed 6990
  • Fresh install of Windows Server 2019 and IIS 10

enter image description here

  • Web Deployed an ASP.NET MVC 5 application to the website
  • Anonymous user identity is set to "Application Pool Identity"

enter image description here

  • Site level also has anonymous authentication enabled

enter image description here

  • The IIS AppPool\ApplicationPoolName has the following effective permissions for the web root which sits under a root folder:

enter image description here

And yet when I access the website I receive a 403:

enter image description here

If I place a static file such as index.html in the web root then the contents of the file are served up as expected. So this seems related to MVC.

What have I missed here?

1 Answers

According to your description, I suggest you could re-check your folder to make sure your application pool identity has the perission to access that folder.

Details, you could refer to below steps:

1.Right click the folder which you hosted the application and select property.

2.Select the Security tab

3.Click the Edit button and then Add button

4.Click the Locations button and make sure that you select your computer.

5.Enter IIS AppPool\ (eg: IIS AppPool\smartcrypt) in the Enter the object names to select: text box.

6.Click the Check Names button and click OK.

7.Check Modify under the Allow column, and click OK, and OK.

Related