Thursday, December 13, 2018

ASP .NET MVC Application - HTTP Error 403.14 – Forbidden

Here are few reasons to get “HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.” error in ASP .NET Web application.



1. ASP.NET not registered on the server. To fix it, execute following command in command prompt:
Windows 32bit
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

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

2. Wrong .NET version (v2.0 instead of v4.0) is configured on the web site application pool. To fix it, find the Application Pool of the website, go to Advanced Settings and make sure that the .NET Framework version value v4.0 is selected.

3. Wrong IIS directory permissions. To fix it, make sure App Pool user has enough permission to the website directory.

Also make sure connection strings in the web.config are correct and there is no missing DLLs in the bin folder.