如何在IIS 6 Web服务器上启用升级和缩小 [英] How to enable bunding and minification on IIS 6 web server
问题描述
我正在尝试将我的网站发布到部署服务器。其中包括对global.asax文件的application_start.which的更改,注册一个包来加载/压缩js / css文件。它可以在服务器上使用本地解决方案和IIS 7版本。
但是当我使用IIS 6将相同的应用程序部署到服务器时,登录到页面后没有加载捆绑的资源。我怀疑global.asax有问题,因为这个文件使得调用bundle类来注册捆绑的资源。
当我查看global.asax文件时,.global.asax文件出现在publised文件夹的两个根目录中global.dll文件存在于bin文件夹中。
我不明白它为什么不更新服务器(IIS 6)中的global.asax文件的原因。
由于这个问题,我无法将其部署到服务器。我一直试图解决这个问题。但是还是失败了。
IIS 6中的任何配置都是必需的红色用于解决此问题与global.asax或在IIS 6上捆绑和缩小。?
谢谢,
Syed
I am trying to publish my website to deployment server.Which includes changes to global.asax file's application_start.which registers a bundle to load/compress js/css files.it works fine with local solution and IIS 7 version on server.
But when I deploy same application to server with IIS 6 bundled resources are not loaded after login to the page.I suspect problem with global.asax as this file makes a call to the bundle class to register bundled resources.
When I look at the global.asax file.Global.asax file is present in both root directory of publised folder and global.dll files are present in bin folder.
I dont understand the reason that why it is not updating the global.asax file in server(IIS 6).
Due to this issue i am not able to deploy it to server.I have been trying to resolve this problem.but left with failure.
Any Configuration in IIS 6 is required to solve this issue with global.asax or bundling and minification on IIS 6.?
Thanks,
Syed
推荐答案
听起来没有为您的捆绑URL请求ASP.NET。
根据这篇MSDN博客文章 [ ^ ],无扩展名的网址应该在IIS6,具有以下条件:
- 注册表值
HKLM \ SOFTWARE \ Microsoft \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
未定义,或设置为1;- v4.0
aspnet_filter.dll
注册为ISAPI过滤;- v4.0
aspnet_isapi.dll
是s cript在网站级别映射到.axd;- v4.0
aspnet_isapi.dll
在ISAPI限制列表中标记为允许 ;- 该网站已启用阅读和脚本权限;
It sounds like ASP.NET isn't being called for requests to your bundle URL.
According to this MSDN blog post[^], extensionless URLs should work in IIS6, given the following conditions:
- The registry value
HKLM\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\EnableExtensionlessUrls
is not defined, or is set to "1";- v4.0
aspnet_filter.dll
is registered as an ISAPI filter;- v4.0
aspnet_isapi.dll
is script mapped to ".axd" at the web site level;- v4.0
aspnet_isapi.dll
is marked as "Allowed" in the ISAPI Restriction list;- The web site has read and script permission enabled;
这篇关于如何在IIS 6 Web服务器上启用升级和缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!