Different Session shares same cookies


  
 Applies To 
  
 Product(s):eB Web
 Version(s):All
 Environment: Window Server 2008 64 bit
 Area: IIS
 Subarea: 
 Original Author:Swapnil Tapadia, Bentley Technical Support Group
  

 Scenario

===============

User are logged in and seeing another users name at the top of the screen.
Therefore, multiple users who access the same page may receive identical cookies.

Background

=====================

Consider, 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

Workaround

====================

Method 1:
You can disable kernel mode caching systemwide, or you can disable kernel mode caching for a specific ASP.NET application.
To do so, follow the below 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
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:
You can disable output caching in the specific ASP.NET page that generates an HTTP header that contains a Set-Cookie response.
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.