Solution for “Static compression is being disabled” error

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

I saw “Static compression is being disabled” error in Event Viewer. It didn’t have any user-side effects but SCCM kept sending notifications about it.

 

The entire error description:

Error ID 2264: The directory specified for caching compressed content C:\inetpub\temp\IIS Temporary Compressed Files\domain.com is invalid. Static compression is being disabled

 

2.png

 

Environment and Settings

  • IIS server is Windows Server 2012 R2
  • There are several websites hosted in the server
  • Anonymous Authentication is enabled. It uses App Pool Identity
  • Static Compression is enabled on both server and website level. Static Compression folder is C:\inetpub\temp\IIS Temporary Compressed Files
  • There are sub-folders for each website. The owner of these folders is Administrator

 

Solution

Setting application pool accounts as the owners of the sub-folders in IIS Temporary Compressed Files solved the issue. For example: IIS APPPOOL\domain.com local account should be the owner of the domain.com folder.

In order to change a folder owner, follow the steps below:

  1. Delete the folder
  2. Create it with the same name
  3. Right click and go to “Properties”
  4. Select “Security”. Click “Advanced”
  5. Click “Change” for the owner field at the top

 

More Information

When a compression folder is created by IIS application pool identity which is part of the Administrators group, the folder is owned by the local Admin group. IIS checks ownership on existing compression folders when application pool starts. If it isn’t the owner, it attempts to delete and recreate the folder. Subsequent app pools may get caught in infinite loop attempting to delete and recreate the folder which causes the error mentioned above.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.