locked
GZIP Compression in IIS 7.5 is not working, How to trubleshoot? Please Help ....! RRS feed

  • Question

  • User1919757445 posted

     Hi experts.

    Here is my problem:

    I'm trying to enable GZIP compression on IIS 7.5
    bun no success after hours of googleing.

    I think all the settings are ok

     In ApplicationHost.config I have this httpCompression section:

    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" minFileSizeForComp="0">
           <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
           <staticTypes>
                 <add mimeType="text/*" enabled="true" />
                 <add mimeType="message/*" enabled="true" />
                 <add mimeType="application/x-javascript" enabled="true" />
                 <add mimeType="application/atom+xml" enabled="true" />
                 <add mimeType="application/xaml+xml" enabled="true" />
           </staticTypes>
    </httpCompression>

    And this urlCompression section:

    <urlCompression dostaticcompression="true" />

     

    and Here is Failed Request Tracing result:

       STATIC_COMPRESSION_NOT_SUCCESS     
      Reason="UNKNOWN_ERROR"  

     

    Any help would be appreciated
    Wednesday, November 3, 2010 3:02 AM

Answers

  • User1919757445 posted

    Thanks  Lloydz

    Problem solved.

    It was permissions.

    The article ( http://learn.iis.net/page.aspx/140/understanding-built-in-user-and-group-accounts-in-iis-7/)  is really good.

    The problem was that IIS could not write it's gziped compressed files in the "IIS Temporary Compressed Files" folder.

    I grant read/write permission to IIS_IUSRS for IIS Temporary Compressed Files folder. and it's now gziping...

    The only thing is why a fresh installation of IIS had such misconfiguration !!!

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, November 10, 2010 6:36 AM

All replies

  • User-176674611 posted

    Hi,

    I cannot followed your settings to reproduce your error. Would you please have a check which file extension of the request causes the error?

    You can also refer to the following thread:
    http://forums.iis.net/t/1071156.aspx
    Hope this helps.

    Thanks.

    Monday, November 8, 2010 1:56 AM
  • User1919757445 posted

    Hi LIoydz. thanks for reply

    For every extensions it fails to compress. I'm testing .js and .html files. but I know nothing is successfully compressed. I'm just trying to compress static types.

    As I said, unfortunately in the "failed request trace" it shows Reason="UNKNOWN_ERROR"

    In some forums and blogs people said maybe it's a matter of wrong permissions. some guy said IIS can not write in the "%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"

    I admit that nothing is written in that folder. but I dont know what is the user of IIS.

    What is the best practice to set permissions. and how can I trace to find is it wrong permissions?

    Tuesday, November 9, 2010 4:05 PM
  • User-176674611 posted

    Hi,

    Please take the following steps to grant the write permissions:
    Right click the folder -> Choose properties -> Select Security tab -> Click Edit -> Grant write permission to the user.

    Please also check the following article to get detail information about Built-In User and Group Accounts in IIS 7.

    Understanding Built-In User and Group Accounts in IIS 7
    http://learn.iis.net/page.aspx/140/understanding-built-in-user-and-group-accounts-in-iis-7/

    You can also use process monitor to trace which user intends to take write operation for the folder.

    Thanks.

    Tuesday, November 9, 2010 9:39 PM
  • User1919757445 posted

    Thanks  Lloydz

    Problem solved.

    It was permissions.

    The article ( http://learn.iis.net/page.aspx/140/understanding-built-in-user-and-group-accounts-in-iis-7/)  is really good.

    The problem was that IIS could not write it's gziped compressed files in the "IIS Temporary Compressed Files" folder.

    I grant read/write permission to IIS_IUSRS for IIS Temporary Compressed Files folder. and it's now gziping...

    The only thing is why a fresh installation of IIS had such misconfiguration !!!

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, November 10, 2010 6:36 AM