小编Dus*_*tin的帖子

ASP.NET/MVC 4在64位IIS 7.5服务器上捆绑和缩小404问题

我们最近将我们的项目从MVC 3升级到MVC 4.我们的目标是.NET 4.0框架,由于我们必须包含一些参考,我们的Web应用程序是32位的.

我们遇到的问题是我们将捆绑/缩小从Chirpy转换为内置的ASP.NET捆绑.该站点在32位服务器上运行,包括仅运行.NET 4.0的Windows Server 2003/IIS 6和2008/IIS 7.5以及我们的64位开发计算机.捆绑/缩小在上述所有方面都能正常工作.

在仅安装了.NET 4.0的64位Windows 2008/IIS 7.5服务器上,捆绑不起作用.生成的脚本和样式都会出现404错误.

如果我们在64位服务器上安装.NET 4.5,它可以正常工作.我们对此感到困惑,因为有些服务器在没有.NET 4.5的情况下工作,而这一点需要它.最重要的是,Windows Server 2003/64位与.NET 4.5不兼容,因此如果这也存在问题,则此修复程序将不起作用.

奇怪的是,针对.NET 4.0构建x86的示例MVC 4示例互联网应用程序在问题服务器上只有4.0就可以正常工作.除了unity,logging,elmah和dot less配置之外,web.config完全相同.

任何有关这方面的帮助将非常感激.

这是BundleConfig.cs:

using System.Web;
using System.Web.Optimization;

namespace WebApp
{
    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = false;

            // .debug.js, -vsdoc.js and .intellisense.js files 
            // are in BundleTable.Bundles.IgnoreList by default.
            // Clear out the list and add back the ones we want to ignore.
            // Don't add back .debug.js.
            bundles.IgnoreList.Clear();
            bundles.IgnoreList.Ignore("*-vsdoc.js");
            bundles.IgnoreList.Ignore("*intellisense.js"); …
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc asp.net-mvc-4 asp.net-4.5 bundling-and-minification

7
推荐指数
1
解决办法
4930
查看次数