HTTP Error 403.16 – Forbidden – IIS 10 Express

A very quick tip how to solve “HTTP Error 403.16 – Forbidden” issue when trying to run a new MVC web application on Windows 10 using IIS 10 Express. After some quick tests and research on Google I made a conclusion that this problem is actually not related neither to Windows, nor IIS.

Screenshot of the error message below.

IIS 10 Express Error

It’s confusing, since if you make directory browse-able, it will not fix the problem, just will list your current files.

The first thing to check when you run into an issue like this with MVC applications is routing (App_Start/RouteConfig.cs). Since I’ve created a completely empty solution, after a scaffold my default route was like the one below.

routes.MapRoute(
    name: "Default",
    url: "{controller}/{action}/{id}",
    defaults: new { action = "Index", id = UrlParameter.Optional }
);

And the problem is that default controller is not specified… I’ve set default route to point to my Home controller, and the default routing looks like this now.

routes.MapRoute(
    name: "Default",
    url: "{controller}/{action}/{id}",
    defaults: new { Controller = "Home", Action = "Index", id = UrlParameter.Optional }
);

And it started to work right away!

A quick tip when troubleshooting the start of the web application – make sure you can access simple static files in the folder via browser. You can add a dummy index.html file to the root folder, and try to start the application again. If you can’t see the contents of the index.html then you might need to review folder and/or firewall permissions/settings. But if you can, then remove the file and the problem should be within your web application.

Good luck!