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

问题描述:

当我想将 MVC 4 (.net 4.5) 应用程序部署到我的 iis 时,我收到 403.14 提示我内容不可浏览.

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.

当我部署未更改的 mvc 4 模板时也会发生这种情况.

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

在 .net 4.0 中使用 mvc 4 模板时,一切正常.我查看了其他帖子,但找不到解决方案.

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

设置了

我运行了 aspnet_regiss -i,没有任何错误.

i ran aspnet_regiss -i which completed without any errors.

唯一奇怪的是.net 4.5安装在.net 4.0目录%windows%/microsoft.net/Framework64/4.0.30319我也从这个文件夹运行了 aspnet_regiis.

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.

为了确保安装了 4.5,我重新启动了 .net 4.5 安装程序,它告诉我它已安装

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

apppools 还向我显示 4.0.30319 作为版本.

Also the apppools show me 4.0.30319 as version.

还有一个以 4.5 为目标的 mvc 应用程序可以运行.但我不知道它是否是使用 4.0 模板创建并重定向到 4.5有什么提示吗?

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?

app.config 是 mvc 4 模板中未更改的默认值.

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

我刚刚测试创建了一个子文件夹,然后将其转换为应用程序.将站点放置在那里使其适用于主页.但是所有子页面例如登录都以 404 Not Found 结束

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?

.net 4.5 替换 .net 4. http://msdn.microsoft.com/en-us/library/5a4x27ek.aspx.你可能想在你的 web.config 文件中使用它来让你的应用程序工作:

.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>

如果代码执行您想要的操作,那么您将希望按照此处所述的正确方式进行操作:http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html

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