Express Cache Not Deleting

Document ID: 10272

Synopsis

Express Cache folders and files not are deleting after session end.

More Information

Express Cache Not Deleting Express Cache folders and files not are deleting after session end. To correct the cache deletion problem, follow the instructions below:
  1. Browse to the mailsite directory
  2. Select the express directory
  3. Right click on the cache directory
  4. Select security
  5. add the account IWAN_(machinename) account with full permissions

The IWAM account is responsible for processing the delete action as described by the following information from the Microsoft knowledge base article 277329 that pertains to this problem:

The Application_OnEnd and Session_OnEnd events do not run with the security context of the impersonated user, that is, the user that is determined by the Internet Information Server (IIS) authentication method (Anonymous, Basic, NT Integrated, and so on). Instead, these events run in the security context of the process itself.

For in-process or Low application protection applications, SYSTEM is the identity of the IIS service. Because the SYSTEM user ID is restricted to local computer access, access to network resources fails.

For isolated processes, Medium pooled, or High isolated applications, this is the identity of the Microsoft Transaction Server (MTS) or COM+ package. By default, this identity is IWAM_, which is an account that exists in the local NT user database. If the Web server is not running on a Domain controller (which it is usually not), this user ID cannot access resources other than those that are local to the Web server.

So you must add the IWAM user to have rights on the cache directory.