为什么我的 ASPX 页面未在启用 Gzip 的情况下进行压缩?

发布于 2024-08-07 20:54:08 字数 308 浏览 4 评论 0原文

因此,我在 IIS 6 中设置了 gzip 压缩。

我启用了静态文件和应用程序文件的压缩。我设置了一个大小为 1,024 MB 的临时目录。

我修改了 Metbase 以包括:htm、html、js、css、aspx、xml。

我将压缩级别设置为 9。

我添加了一个名为 HttoCompression 的 WSE,并将其设置为 gzip.dll,将其设置为“允许”。

我重置了 IIS。

我注意到我的 css、xml 和 js 文件被压缩,但 ASPX 页面没有被压缩。

我错过了什么吗?

So I set up gzip compression within IIS 6.

I enabled the compression for both static files and application files. I set up a temp directory with the size of 1,024 MB.

I modified the Metbase to include: htm,html,js,css,aspx,xml

I set the compression level to 9.

I added a WSE, called HttoCompression and set it to the gzip.dll aset it to "Allow".

I reset IIS.

I notice that my css, xml and js files are being compressed, but ASPX pages are not.

Did I miss something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

奶茶白久 2024-08-14 20:54:08

默认情况下,静态文件类型为 .txt、.htm 和 .html &动态文件类型 .exe、.dll 和 .asp 在 IIS 中设置为压缩。

因此,要添加其他文件类型,您需要通过编辑配置数据库或使用 IIS 管理器(对于压缩目录)为每个压缩选项配置自定义设置。

有关更多说明,请访问 http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx?mfr=true

By default static file types .txt, .htm, and .html & dynamic file types .exe, .dll, and .asp are set for compression in IIS.

So to add other file types you need to configure custom settings for each compression option by editing the metabase or alternatively — in the case of the compression directory — by using IIS Manager.

For more explanations plz visit http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx?mfr=true

九厘米的零° 2024-08-14 20:54:08

您是否正确遵循了这些步骤?

http://support.microsoft.com/kb/322603

另外,我强烈推荐 Port 80 的解决方案:

http://www.port80software.com/products/httpzip/

Have yo followed these steps correctly?

http://support.microsoft.com/kb/322603

Also, I would highly recommend Port 80's solution:

http://www.port80software.com/products/httpzip/
无人接听 2024-08-14 20:54:08

您需要去编辑 IIS Metabase 文件。如果完成后不想重新启动 IIS/服务器,请单击 IIS 中的实时配置数据库编辑

从 MS 文章中您可以获得一些补丁结果。

更容易遵循的帖子(来自阿特伍德先生),基本上只是剪切并粘贴当前值。
http://www.codinghorror.com/blog/archives/000059.html

You will need to go and edit the IIS Metabase file. If you dont want to resrart IIS / the server once you have done it click alolow live metabase edits in IIS

From the MS article you can get some patch results.

Easier post to follow (From Mr Atwood), basicly just cut and paste over the current values.
http://www.codinghorror.com/blog/archives/000059.html

┾廆蒐ゝ 2024-08-14 20:54:08

我遇到了同样的问题,结果我将 aspx 扩展名放在 MetaBase.xml 文件中的错误位置,

当我将其放在 HcFileExtensions 下时,它不起作用。当我将它放在 HcScriptFileExtensions 下时,它确实起作用了。

I had the same issue and it turned out I put the aspx extension in the wrong spot in the MetaBase.xml file

When I put it under HcFileExtensions it did not work. When I put it under HcScriptFileExtensions it did work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文