【问题标题】:asp.net webforms Bundling and Minification not working with .net framework 4.0asp.net webforms 捆绑和缩小不适用于 .net framework 4.0
【发布时间】:2016-07-27 21:49:15
【问题描述】:

我已经按照下面的教程配置了我的项目

http://igorzelmanovich.blogspot.co.uk/2012/09/using-aspnet-bundling-and-minification.html

我已经安装了所有需要的包。

一切都很好。

我还看到了 chrome devloper 工具中的捆绑,如下所示 http://localhost/JavaScriptLibraries/jQuery/js?v=ifJSwr5Uh90QHbVi_neoWhazO4vJ9Agrw2Mnj7L8myw1

但它在控制台中给出错误

加载资源失败:服务器响应状态为 404(未找到) http://localhost/JavaScriptLibraries/jQuery/js?v=ifJSwr5Uh90QHbVi_neoWhazO4vJ9Agrw2Mnj7L8myw1

所以我的问题是 .net framework 4.0 中的这种捆绑和缩小支持?

或者我必须升级到 4.5

【问题讨论】:

    标签: asp.net visual-studio-2010 webforms iis-7 .net-4.0


    【解决方案1】:
    <system.webServer>
     <modules>
       <remove name="BundleModule" />
       <add name="BundleModule" type="System.Web.Optimization.BundleModule" />
     </modules>
    </system.webServer>
    

    web config 中的上述配置解决了我的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-05-22
      • 2018-04-26
      • 2013-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多