Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolving the 403.14 error for ASP.NET on Windows Server 2016

I am working with a brand-new Windows Server 2016 virtual machine and I deployed an ASP.NET MVC Web API application on it using Web Deploy from Visual Studio 2017. However, I found that when I browsed to the application locally, I received a page with the following error:

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

After doing some research online I found that this is a common issue and that many solutions have been given. For example, see the following:

ASP.NET MVC on IIS 7.5

MVC4 HTTP Error 403.14 - Forbidden

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents

ASP MVC in IIS 7 results in: HTTP Error 403.14 - Forbidden

HTTP Error 403.14 - Forbidden - MVC4 .net 4.5 bundles

HTTP Error 403.14 - Forbidden. Asp.NET MVC

HTTP Error 403.14 - Forbidden IIS Error for ASP.Net MVC 4 Application

However, none of the solutions I tried resolved this problem on my Windows Server 2016 instance.

like image 991
Ian Anderson Avatar asked Mar 22 '17 15:03

Ian Anderson


People also ask

How do you resolve the Web server is configured to not list the contents of this directory?

To do it, select Start, select Run, type inetmgr.exe, and then select OK. In IIS Manager, expand server name, expand Web sites, and then select the website that you want to change. In the Features view, double-click Directory Browsing. In the Actions pane, select Enable.


1 Answers

Here's the solution that worked for me:

Many people suggested running the following command to register ASP.NET on the machine:

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

It turns out that in Windows Server 2016, you need to go to the Add Roles and Features Wizard to do this (search for "turn windows features on or off" in the Windows search). In the wizard, click Next until you get to the Server Roles page. Scroll down and open the following node:

Web Server (IIS) > Web Server > Application Development

Put a checkmark next to "ASP.NET 4.6" and click Next, and follow the prompts to install it.

enter image description here

After installing ASP.NET 4.6 I found that the 403.14 issue was resolved.

like image 96
Ian Anderson Avatar answered Sep 28 '22 01:09

Ian Anderson