Megosztás a következőn keresztül:


IIS Static compression : "The directory specified for caching compressed content is invalid. Static compression is disabled" Warnings in event viewer(2264)

The  < httpCompression> element specifies the HTTP compression settings for Internet Information Services (IIS) 7. HTTP compression can provide faster transmission times between IIS and client browsers that can accept compressed files.

More about httpcompression

When a user requests for a page, the IIS worker process creates a folder specific to the application pool on the configured IIS Cache directory (One time i.e. under C:\inetpub\temp\IIS Temporary Compressed Files\appPoolName).

The folder is getting created but we are getting a warning on the Eventvwr for IIS-W3SVC-WP source.

“The directory specified for caching compressed content <folder location> is invalid. Static compression is disabled.

Log Name:     Application

Source:       Microsoft-Windows-IIS-W3SVC-WP

Date:         9/1/2017 3:07:58 PM

Event ID:     2264

Task Category: None

Level:         Warning

Keywords:     Classic

User:         N/A

Computer:

Description:

The directory specified for caching compressed content C:\inetpub\temp\IIS Temporary Compressed Files\appPoolName is invalid. Static compression is being disabled.

Event Xml:

<Event xmlns="https://schemas.microsoft.com/win/2004/08/events/event">

<System>

<Provider Name="Microsoft-Windows-IIS-W3SVC-WP" Guid="{670080D9-742A-4187-8D16-41143D1290BD}" EventSourceName="W3SVC-WP" />

<EventID Qualifiers="32768">2264</EventID>

<Version>0</Version>

<Level>3</Level>

<Task>0</Task>

<Opcode>0</Opcode>

<Keywords>0x80000000000000</Keywords>

<TimeCreated SystemTime="2017-09-01T22:07:58.000000000Z" />

<EventRecordID>1063103</EventRecordID>

<Correlation />

<Execution ProcessID="0" ThreadID="0" />

<Channel>Application</Channel>

<Computer> </Computer>

<Security />

</System>

<EventData>

<Data Name="Directory">C:\inetpub\temp\IIS Temporary Compressed Files\appPoolName</Data>

<Binary>05000000</Binary>

</EventData>

</Event>

Whenever we delete the subfolders under ' C:\inetpub\temp\IIS Temporary Compressed Files', the folder recreates with 'IUSRS' as the owner and we were not getting these warning logged again . But after sometime if we delete the app pool folder and  recycled the application pool the same warnings were getting logged on the event viewer for the first request .

Before troubleshooting this issue , make sure you have checked the below things :

  • Ensured that static compression is enabled on the IIS configuration
  • Provided the application pool service account/ IIS_IUSRS  required access on the IIS Cache directory
  • Do not change the Default location of this directory

In order to troubleshoot this issue further we ran the procmon and saw who is owning the compression folder

  • We found that the compression folder is being created (and owned by) IUSR
  • The compression folder must be owned by the AppPool Identity.
  • IUSR is the default identity used by IIS when 'Anonymous Authentication' is used

To resolve this issue we followed the below steps :

Right click 'Anonymous Authentication' in IIS -> Set to 'AppPool Identity' -> Delete compression folder -> restart IIS website -> When new compression folder is created it will be owned  by the AppPool identity and no Events 2264 will occur.

Note: The new owner will be 'Administrators' if the AppPool Identity is in the local administrators group.

 

Hope this helps !!!  😊

Comments

  • Anonymous
    February 15, 2018
    Very useful article.
  • Anonymous
    February 15, 2018
    Great Article!! Helped me a lot :)
  • Anonymous
    April 07, 2018
    Great Article! thanks for this Mayur