Monday, February 27, 2006

SQL Server ASP.NET session storage

We recently started using SQL Server to store ASP.NET session on our web farm and encountered a problem where session was being lost.  The following article indicates Session_End is not fired when using SQL Server to store session state.  I was able to confirm this by creating simple application using SQL Server session state.  What I also realized is this

 

  • Session_End is not called when using SQL Server session storage.  But, when Session.Abandon is called the stored procedure called ASPState..TempRemoveStateItem is triggered to remove the session row from the sql server database.  This was confirmed using sql trace while running an ASP.NET application that called Session.Abandon.

 

My question is who calls the ASPState..TempRemoveStateItem stored procedure when Session_End event is not fired?

 

No comments: