gpt4 book ai didi

.net - HTTP 错误 403.14 - 禁止 - MVC4 .net 4.5 包

转载 作者:行者123 更新时间:2023-12-03 10:10:21 26 4
gpt4 key购买 nike

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

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

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) 冉 %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir在 cmd 中
4) 检查我的应用程序池是否设置为集成模式
5) 检查它是否设置为使用 .net 4

最佳答案

您可以在这里找到答案:ASP.NET MVC framework 4.5 CSS bundles does not work on the hosting

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

关于.net - HTTP 错误 403.14 - 禁止 - MVC4 .net 4.5 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13482637/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com