Fork me on GitHub

MVC4脚本压缩 BundleTable bundles 404错误

在发布网站的时候,因为使用了MVC4的新特性BundleTable,造成访问的时候js和css报了404错误,

google了以后, 有朋友说是因为要在webservice添加

1
2
3
4
5
6
7
8
<modules runAllManagedModulesForAllRequests="true"//当前这一行
  <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/>
  <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core"/>
  <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core"/>
  <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core"/>
  <add name="SecurityModule" type="BlogEngine.Core.Security, BlogEngine.Core"/>
  <add name="RightModule" type="BlogEngine.Core.Right, BlogEngine.Core"/>
</modules>

 添加了以后还是报错。

然后自己摸索了,在配置IIS程序池的时候,将托管模式设置为“集成”就神奇的好了。。。

还得摸索原因啊。。

posted @   IsaacZhang  阅读(620)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
历史上的今天:
2013-02-28 《CLR via C#》Part1之Chapter2 生成、打包、部署及管理应用程序及类型(二)
2013-02-28 新概念系列之《Part1 Lesson 143 A walk through the woods》
2013-02-28 委托的使用(转)
点击右上角即可分享
微信分享提示