Saturday, October 18, 2014

FactFile SessionID in and SqlServer SessionState

Facts to be remember. While dealing with session always keep below factfile into consideration.

I created a variable in the Session_Start in the global.asax file:
var sessionID = Session.SessionID;
I found the following data while debugging the application:

ASP.NET generated : lehxv4so4ioi2gqqaxtjzhyo
SQL Server saved  : lehxv4so4ioi2gqqaxtjzhyo84497b6f
in bold is your sessionid and in italics is the application id
the extra 8 bytes are the applicationid

SQL Server Session Tables


SQL Server Session Database

tempdb database in SQL Server by default
  1. Very Very Imp never use Tempdb for outproc session.
  2. In out proc mode session_end never calls, no use if you apply any debug or diagnostics pointers.
If we using webfarm and out proc session, ensure machine key across server instance is unique.

Cookie Container





Post a Comment