.net 4.5 Asp Mvc -> Error 403.14- IIS 7 - Windows Server 2008 R2

妖精的绣舞 提交于 2019-12-23 07:02:24

问题


When I want to deploy an MVC 4 (.net 4.5) application to my iis i got the 403.14 calling me that the content ist not browseable.

This also occurs when i deploy the unchanged mvc 4 template.

when using the mvc 4 template with .net 4.0 everything works. I checked the other posts but can't figure out the solution.

ist set

i ran aspnet_regiss -i which completed without any errors.

the only strange thing is that .net 4.5 is installed in the .net 4.0 directory %windows%/microsoft.net/Framework64/4.0.30319 From this folder i also ran aspnet_regiis.

to ensure that 4.5 is installed i restarted the .net 4.5 setup and it tells me taht it is installes

Also the apppools show me 4.0.30319 as version.

There is an other application targeting mvc with 4.5 which runs. but i don't know wether it was created with a 4.0 templated and retargeted to 4.5 Any hints?

The app.config is the unchanged default from the mvc 4 template.

I just tested to create a subfolder which i convert to an application. placing the site there makes it working for the main page. But all subpages forexample login end ab in a 404 Not Found

But why not on root folder?


回答1:


.net 4.5 replaces .net 4. http://msdn.microsoft.com/en-us/library/5a4x27ek.aspx. You probably want to use this in your web.config file to make you application work:

<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
...
</system.webServer>

If the code does what you want then you will want to do it the proper way as described here: http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html



来源:https://stackoverflow.com/questions/13540428/net-4-5-asp-mvc-error-403-14-iis-7-windows-server-2008-r2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!