Urlrewritten页面上的IIS 6压缩不起作用

时间:2021-11-10 13:03:59

I'm developing a asp.net site (running .net 3.5 SP 1) and using UrlRewriter.Net (http://urlrewriter.net/) for urlrewriting.

我正在开发一个asp.net站点(运行.net 3.5 SP 1)并使用UrlRewriter.Net(http://urlrewriter.net/)进行urlrewriting。

The site is hostet on a Windows 2003 server with all servicepacks and so forth.

该站点是Windows 2003服务器上的hostet,包含所有servicepacks等等。

It runs IIS 6.

它运行IIS 6。

In order to enable url rewriting I've setup a wildcard handler for *, which means all requests are sent through the asp.net engine.

为了启用url重写,我为*设置了通配符处理程序,这意味着所有请求都是通过asp.net引擎发送的。

I've also enabled IIS compression feature - this works fine when I use the non-rewritten urls. However it doesn't compress the rewritten pages.

我还启用了IIS压缩功能 - 当我使用非重写的URL时,这可以正常工作。但是它不会压缩重写的页面。

I've added aspx, ashx and asmx as extensions to the metabase.xml, and set the proper compression level (9), etc.

我已经添加了aspx,ashx和asmx作为metabase.xml的扩展,并设置了适当的压缩级别(9)等。

The rewritten pages have .htm extension, so it shouldn't be because the extension is wrong.

重写的页面有.htm扩展名,所以不应该因为扩展名错误。

Any ideas why this doesn't work ?

任何想法为什么这不起作用?

2 个解决方案

#1


Probably because of the wildcard, IIS sends the request to ASP.NET, which further handles page generation etc. The compression happens to late in the pipeline, so it gets bypassed...

可能是因为通配符,IIS将请求发送到ASP.NET,进一步处理页面生成等。压缩发生在管道的后期,因此它被绕过...

#2


Unfortunately I haven't enough rep to leave comments.

不幸的是,我没有足够的代表留下评论。

If the issue is that compressions happens at the wrong time in the pipeline, I'd expect it didn't work for .aspx either (since everything is sent through the asp.net handler)

如果问题是压缩发生在管道中的错误时间,我希望它也不适用于.aspx(因为所有内容都是通过asp.net处理程序发送的)

That being said, I guess it could handle .aspx earlier in the pipeline, as I believe the wildcard handler functions as a "last resort". Unfortunately on IIS 6 there is no changing the priority of handlers :-(

话虽这么说,我想它可以在管道中更早地处理.aspx,因为我相信通配符处理程序是一个“最后的手段”。不幸的是在IIS 6上没有改变处理程序的优先级:-(

I guess I'll have to ask our administrator for a Windows 2008 server with IIS 7.

我想我将不得不向管理员询问带有IIS 7的Windows 2008服务器。

#1


Probably because of the wildcard, IIS sends the request to ASP.NET, which further handles page generation etc. The compression happens to late in the pipeline, so it gets bypassed...

可能是因为通配符,IIS将请求发送到ASP.NET,进一步处理页面生成等。压缩发生在管道的后期,因此它被绕过...

#2


Unfortunately I haven't enough rep to leave comments.

不幸的是,我没有足够的代表留下评论。

If the issue is that compressions happens at the wrong time in the pipeline, I'd expect it didn't work for .aspx either (since everything is sent through the asp.net handler)

如果问题是压缩发生在管道中的错误时间,我希望它也不适用于.aspx(因为所有内容都是通过asp.net处理程序发送的)

That being said, I guess it could handle .aspx earlier in the pipeline, as I believe the wildcard handler functions as a "last resort". Unfortunately on IIS 6 there is no changing the priority of handlers :-(

话虽这么说,我想它可以在管道中更早地处理.aspx,因为我相信通配符处理程序是一个“最后的手段”。不幸的是在IIS 6上没有改变处理程序的优先级:-(

I guess I'll have to ask our administrator for a Windows 2008 server with IIS 7.

我想我将不得不向管理员询问带有IIS 7的Windows 2008服务器。