Need help with some IIS7 web.config compression settings.
Posted
by Pure.Krome
on Server Fault
See other posts from Server Fault
or by Pure.Krome
Published on 2009-06-11T00:53:22Z
Indexed on
2010/04/08
3:43 UTC
Read the original article
Hit count: 548
Hi folks,
I'm trying to configure my IIS7 compression settings in my web.config file. I'm trying to enable HTTP 1.0 requests to be gzip.
MSDN has all the info about it here.
Is it possible to have this config info in my own website's web.config file? Or do i need to set it at an application level? Currently, I have that code in my web.config...
<system.webServer>
<urlCompression
doDynamicCompression="true"
dynamicCompressionBeforeCache="true" />
<httpCompression
cacheControlHeader="max-age=86400"
noCompressionForHttp10="False"
noCompressionForProxies="False"
sendCacheHeaders="true" />
... other stuff snipped ...
</system.webServer>
It's not working :( HTTP 1.1 requests are getting compressed, just not 1.0.
That MSDN page above says that it can be used in :-
- Machine.config
- ApplicationHost.config
- Root application Web.config
- Application Web.config
- Directory Web.config
So, can we set these settings on a per-website-basis, programatically in a web.config file? (this is an Application Web.config file...) What have i done wrong?
cheers :)
EDIT: I was asked how i know HTTP1.0 is not getting compressed. I'm using the Failed Request Tracing Rules, which reports back:-
DYNAMIC_COMPRESSION_START
DYNAMIC_COMPRESSION_NOT_SUCESS
Reason: 3
Reason: NO_COMPRESSION_10
DYNAMIC_COMPRESSION_END
© Server Fault or respective owner