Microsoft Knowledge Base Email Alertz

KBAlertz.com: 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

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 917072 - Last Review: December 3, 2007 - Revision: 1.5

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

On This Page

SYMPTOMS

Consider the following scenario. A Microsoft ASP.NET page contains the <%@ OutputCache %> directive. Additionally, the ASP.NET page generates an HTTP header that contains a Set-Cookie response. In this scenario, the ASP.NET page is stored in the HTTP protocol stack (HTTP.sys) kernel cache in Microsoft Internet Information Services (IIS) 6.0. Therefore, multiple users who access the same page may receive identical cookies.

WORKAROUND

To work around this problem, use one of the following methods, as appropriate for your situation.

Method 1: Disable kernel mode caching

You 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:
  1. 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\CONFIG
    Note 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.
  2. 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 page

You 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:
http://msdn2.microsoft.com/en-us/library/zd1ysf1y(VS.80).aspx (http://msdn2.microsoft.com/en-us/library/zd1ysf1y(VS.80).aspx)

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the enableKernelOutputCache attribute in the ASP.NET settings schema, visit the following MSDN Web site:
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx (http://msdn2.microsoft.com/en-us/library/e1f13641.aspx)
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:
820129  (http://kbalertz.com/Feedback.aspx?kbNumber=820129/ ) Http.sys registry settings for IIS

APPLIES TO
  • Microsoft Internet Information Services 6.0
  • Microsoft ASP.NET 2.0
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
Keywords: 
kbasp kbhttpruntime kbcookie kbconfig kbcaching kbtshoot kbprb KB917072
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please