HTTP 错误 403.14 - 禁止 - MVC4 .net 4.5 包 [英] HTTP Error 403.14 - Forbidden - MVC4 .net 4.5 bundles

查看:41
本文介绍了HTTP 错误 403.14 - 禁止 - MVC4 .net 4.5 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 razor 引擎用 .net 4.5 制作了一个 MVC4 应用程序.使用visual studio在本地运行时效果很好.

I made a MVC4 application with .net 4.5 using razor engine. It works fine when run locally with visual studio.

当我在 windows server 2008 R2 上部署到 IIS 时(所有 windows 更新都完成),我的包似乎不起作用并且 CCS 没有加载.我尝试在服务器上查看站点,查看的源代码转到了 css 的捆绑链接,它加载了一些 css,然后出现了 IIS 错误:

When I deploy to IIS on windows server 2008 R2(all windows updates done), it appears my bundles do not work and the CCS is not loading. I tried viewing the site on the server, viewed source went to the bundle link for the css, and it loads some css and then there is an IIS error of:

HTTP 错误 403.14 - 禁止 Web 服务器被配置为不列出这个目录的内容.

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

我尝试过的:

1) 确保安装了 .net 4.5.
2) 将 <modules runAllManagedModulesForAllRequests="true"/> 添加到我的 web.config
3) 在 cmd
中运行 %windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe -ir4) 检查我的应用程序池是否设置为集成模式
5) 检查它是否设置为使用 .net 4

1) Ensured .net 4.5 is installed.
2) Added <modules runAllManagedModulesForAllRequests="true"/> to my web.config
3) Ran %windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe -ir in cmd
4) Checked that my app pool was set to Integrated Mode
5) Checked that it's set to use .net 4

推荐答案

你会在这里找到你的答案:ASP.NET MVC 框架 4.5 CSS 包在托管上不起作用

You'll find your answer here: ASP.NET MVC framework 4.5 CSS bundles does not work on the hosting

简短的回答是确保您的包名称不会与您站点中的路径名称冲突.

The short answer is to make sure that your bundle names don't conflict with the names of paths in your sites.

这篇关于HTTP 错误 403.14 - 禁止 - MVC4 .net 4.5 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆