IIS 7.5的gzip COM pression在共享主机 [英] IIS 7.5 gzip compression at shared hosting

查看:169
本文介绍了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>

在此<一个href=\"http://stackoverflow.com/questions/1324481/setting-the-gzip-com$p$pssion-in-asp-net\">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是不工作

这篇关于IIS 7.5的gzip COM pression在共享主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆