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.
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.
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
Error 403.14 is the HTTP error code for not being allowed to list the contents of a directory. Please be sure that
Usually, a and d are the biggest issues surrounding MVC deployments to IIS
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.
Windows-> Start -> Turn widows features on and off
Make sure you check required options in
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With