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:
For more information about how to configure registry settings for the HTTP.sys kernel mode driver, click the following article number to view the article in the Microsoft Knowledge Base:
ID d'article : 917072 - Dernière mise à jour : 24 mars 2009 - Révision : 1