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
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
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:
Delete the folder
Create it with the same name
Right click and go to “Properties”
Select “Security”. Click “Advanced”
Click “Change” for the owner field at the top
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.