IIS 7.5的gzip COM pression在共享主机

问题描述:

我有一个网站,它使用ASP.NET并在IIS 7.5托管共享主机,所以我必须要IIS设置直接访问。现在,我想启用使用IIS功能,我的网页和CSS / JS文件gzip的COM pression,但没有在网上查到的食谱为我工作。例如,当我加写的是什么的这里我的web.config,没有什么变化:没有错误,没有COM pression。

I have a web-site, which uses ASP.NET and is hosted at IIS 7.5 shared hosting, so I have no direct access to IIS settings. Now I want to enable gzip compression of my pages and css/js files using IIS capabilities, but none of recipes found at the Internet worked for me. For example, when I add what is written here to my Web.config, nothing changes: no errors, no compression.

这可能吗?如果没有,什么是最好的选择呢?

Is this possible? If not, what's the best alternative?

在本文下方尝试配置示例:

Try the configuration sample at the bottom of this article:

http://www.iis.net/ConfigReference/system。 web服务器/ urlCom pression

<configuration>
   <system.webServer>
      <urlCompression doStaticCompression="true" doDynamicCompression="false" />
   </system.webServer>
</configuration>

在此question它说:

是的,你可以启用COM pression与web.config中,如下shows-的文章,但它可以依靠的权限在服务器允许的网站。

"Yes you can enable compression with the web.config, as the article below shows- but it can depend on the permissions on the server allows sites."

看看这可以帮助你:

IIS 7.5 ASP.NET-4 Gzip已COM pression

或者这样:

的GZip的COM pression在IIS 7.5是不工作