The directory specified for caching compressed content is invalid

Microsoft.Windows.InternetInformationServices.2008.The.directory.specified.for.caching.compressed.content.is.invalid (Rule)

Knowledge Base article:

Summary

The Internet Information Services (IIS) World Wide Web Publishing Service (W3SVC) can be configured to collect performance data and do HTTP compression. If the W3SVC is configured to perform HTTP compression, a valid compression directory that resides on an NTFS volume must be specified.

Resolutions

Check the compression directory

IIS uses a directory where compressed versions of static files can be temporarily cached. The default directory is %SystemDrive%\inetpub\temp\IIS Temporary Compressed Files. To improve file look-up times and security, IIS 7 creates a subfolder in this folder for each application pool, and a subfolder in each application pool folder for each compression scheme.

You can specify a different cache folder by using IIS Manager. This setting is made at the server level. The cache folder setting is stored in the directory attribute of the httpCompression section under system.webServer in the ApplicationHost.config file. If the directory location that is specified does not exist or is inaccessible, static compression will be disabled.

To resolve this error, check the currently configured value by using IIS Manager. If the specified directory does not exist, either create the directory, or specify a new location that does exist. To use IIS Manager, follow these steps.

To modify the compression directory location by using IIS Manager:

For more information about the httpCompression section, see IIS 7: httpCompression Element (IIS Settings Schema).

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.2008.WebServer
CategoryAlert
EnabledTrue
Event_ID2264
Event SourceMicrosoft-Windows-IIS-WMSVC
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
The directory specified for caching compressed content is invalid
{0}
Event LogApplication

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
WA WriteAction Microsoft.Windows.Server.IIS.2008.GenerateAlertAction.SuppressedByDescription Default

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.2008.The.directory.specified.for.caching.compressed.content.is.invalid" Enabled="onEssentialMonitoring" Target="Microsoft.Windows.InternetInformationServices.2008.WebServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-IIS-WMSVC</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>2264</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.2008.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.2008.The.directory.specified.for.caching.compressed.content.is.invalid.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>