Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 339
mithun_daa Avatar asked Jul 11 '12 04:07

mithun_daa


People also ask

What is 403. 14?

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


5 Answers

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

like image 161
MarkKGreenway Avatar answered Oct 26 '22 10:10

MarkKGreenway


Error 403.14 is the HTTP error code for not being allowed to list the contents of a directory. Please be sure that

  1. You have setup the website as an application in IIS
  2. You have .NET 4.5 installed on the server
  3. You have set the application pool to run the proper version of the .NET framework (ie. it is not set to .NET 2.0
  4. You are using the integrated pipeline on your application pool
  5. .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

like image 41
Tommy Avatar answered Oct 26 '22 08:10

Tommy


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.

like image 27
Brian Kirkpatrick Avatar answered Oct 26 '22 10:10

Brian Kirkpatrick


Windows-> Start -> Turn widows features on and off

Make sure you check required options in

enter image description here

like image 33
Kurkula Avatar answered Oct 26 '22 08:10

Kurkula


Before applying

runAllManagedModulesForAllRequests="true"/>

consider the link below that suggests a less drastic alternative. In the post the author offers the following alteration to the local web.config:

  <system.webServer>
    <modules>
    <remove name="UrlRoutingModule-4.0" />
    <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
    </modules>

http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html

like image 26
Jason Koopmans Avatar answered Oct 26 '22 09:10

Jason Koopmans