MVC4 HTTP Error 403.14 - Forbidden
I have build a .net4.5 ASP.NET MVC4 web app which works fine locally (IIS Express & dev server) but once i deploy it to my web server it throws the 403 error. I have installed .Net 4.5RC on the server and even tried the
aspnet_regiis -i
bit that everyone recommended for their issues with previous versions of MVC/.Net but it did not help.
Any ideas?
EDIT: More info about the situation. The server is 32bit and I have 4 other MVC3 applications that work fine. It is just my MVC4 app that is not working.
Solution 1:
Try
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
Via
https://serverfault.com/questions/405395/unable-to-get-anything-except-403-from-a-net-4-5-website
Solution 2:
Error 403.14 is the HTTP error code for not being allowed to list the contents of a directory. Please be sure that
- You have setup the website as an application in IIS
- You have .NET 4.5 installed on the server
- You have set the application pool to run the proper version of the .NET framework (ie. it is not set to .NET 2.0
- You are using the integrated pipeline on your application pool
- .NET 4.5 is actually registered in IIS. Please see this post for a similar issue/resolution
Usually, a and d are the biggest issues surrounding MVC deployments to IIS
Solution 3:
Perhaps... If you happen to use the Publish Wizard (like I did) and select the "Precompile during publishing" checkbox (like I did) and see the same symptoms...
Yeah, I beat myself over the head, but after unchecking this box, a seemingly unrelated setting, all the symptoms described go away after redeploying.
Hopefully this fixes some folks.