HTTP Error 403 - Forbidden after ASP.NET MVC Web Application deploy on IIS 7

Errore 403 - forbidden dopo aver pubblicato una applicazione ASP.NET MVC su IIS 7: come risolvere

The problem

A rather common issue when installing an ASP.NET MVC powered by .NET Framework 4 on IIS 7.0 or higher is the sudden appearance of a HTTP Error 403 - Forbidden upon launch:

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

The text might vary, but the meat is the same: despite anonymous authentication is enabled and all the permissions are set (IUSR, IIS_IUSRS, NetworkService), the web application refuses to run properly.

The fix

Well. the first thing to do obviously is to ensure that what we mentioned above is properly set: anonymous authentication must be set to enabled (Authentication icon in IIS settings) and all the aforementioned users permissions must be properly assigned (filesystem wise). If everything has been handled correctly, you can proceed to add the following section to your web application's web.config file:

Once you do that, you can try to deploy your application again: the issue should be solved.

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

One Comment on “HTTP Error 403 - Forbidden after ASP.NET MVC Web Application deploy on IIS 7”

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.