An ASP.NET page is stored in the HTTP.sys kernel cache in IIS 6.0 when the ASP.NET page generates an HTTP header that contains a Set-Cookie response
Method 1: Disable kernel mode cachingYou can disable kernel mode caching systemwide, or you can disable kernel mode caching for a specific ASP.NET application. This method is the preferred workaround because you can still use output caching in the ASP.NET application. To disable kernel mode caching, follow these steps:
- If you want to disable kernel mode caching systemwide, open the Machine.config configuration file. This file is located in the following folder: Drive:\WINDOWS\Microsoft .NET\Framework\Version\CONFIGNote Drive is a placeholder for the drive where the operating system is installed. Version is a placeholder for the version number of the Microsoft .NET Framework that is installed.
If you want to disable kernel mode caching for a specific ASP.NET application, open the Web.config configuration file. This file is located in the ASP.NET application folder.
- In the configuration file, locate the <httpRuntime> element, and then add the following attribute:enableKernelOutputCache="false"
Method 2: Disable output caching in a specific ASP.NET pageYou can disable output caching in the specific ASP.NET page that generates an HTTP header that contains a Set-Cookie response. However, you must identify every ASP.NET page in the whole application that may generate a cookie. For example, if you are using cookies to maintain the session state, any page that a user accesses may generate a cookie.
To disable output caching in a specific ASP.NET page, delete the <%@ OutputCache %> directive from any .aspx file that you do not want to be cached. For more information about the <%@ OutputCache %> directive in ASP.NET pages, visit the following Microsoft Developer Network (MSDN) Web site:
Article ID: 917072 - Last Review: 12/03/2007 19:53:39 - Revision: 1.5
- kbasp kbhttpruntime kbcookie kbconfig kbcaching kbtshoot kbprb KB917072