Answered by:
Session Management in SQL Azure DB deleting sessions automatically

Question
-
Implemented ASP.NET web role and implemented session handing using ASP.NET universal providers to store the session state in SQl Azure DB.
The table named as Sessions got automatically created and sessions records were saved in SQL Azure DB table. Session timeout as 2 minutes. As per the guideline it is expected that, session records from this table should not get automatically deleted and we will have to call DeleteExpiredSession SP manually to clean up unused sessions.
However, I observed that the session records are getting deleted automatically upon expiry from SQL Azure sessions table. This is surprising. Is this a new behaviour added to SQL Azure and ASP.NET universal provider?
Please answer to only bold text above.
http://sanganakauthority.blogspot.com/
Sunday, July 27, 2014 3:43 AM
Answers
-
I had interactions with Microsoft personnel and found that, new ASPNET universal providers automatically clears out the expired session records from SQL Azure session table. For detailed explanation refers to the following link - http://sanganakauthority.blogspot.in/2014/08/session-management-using-sql-azure-and.html
At the bottom you will find the download link of sample.
http://sanganakauthority.blogspot.com/
- Marked as answer by kunal chandratre Tuesday, August 5, 2014 12:23 PM
Tuesday, August 5, 2014 12:23 PM
All replies
-
Hi Kunal,
I would like to inform you that this behavior is quite un common for us. I suggest you to configure your SQL Azure DB as per this link and let us know if has helped your query.
http://blogs.msdn.com/b/sqlazure/archive/2010/08/04/10046103.aspx
As you've figured out, because of Windows Azure's design,
There are 2 popular options -
1. Using Azure's distributed cache - http://msdn.microsoft.com/en-us/library/windowsazure/gg185668.aspx
2. Using SQL database - http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx
- Proposed as answer by Girish Prajwal Sunday, July 27, 2014 9:15 AM
Sunday, July 27, 2014 9:15 AM -
Girish,
The first link you have specified itself talks about Web providers and it is legacy now. Latest is universal provider and I have already implemented in the same way.
This is really surprizing behaviour of SQL Azure. can you please investigate the issue?
http://sanganakauthority.blogspot.com/
Sunday, July 27, 2014 12:41 PM -
Hi Kunal,
After the clarification in the issue specified above, here is the link which clearly explains on Universal provides for ASP.net and SQL Azure.
Girish Prajwal
Monday, July 28, 2014 5:48 AM -
Prajwal,
All links you have given do not provide the answer to the problem of auto deleting of session records from Sessions table in SQL Azure DB.
http://sanganakauthority.blogspot.com/
Monday, July 28, 2014 6:14 AM -
Hi Kunal,
For better understanding and to find a solution, request you to contact our Technical support team from the below mentioned link.
http://azure.microsoft.com/en-us/support/options/
Girish Prajwal
- Proposed as answer by Girish Prajwal Sunday, August 3, 2014 4:57 AM
- Unproposed as answer by kunal chandratre Tuesday, August 5, 2014 12:18 PM
Monday, July 28, 2014 8:33 AM -
I had interactions with Microsoft personnel and found that, new ASPNET universal providers automatically clears out the expired session records from SQL Azure session table. For detailed explanation refers to the following link - http://sanganakauthority.blogspot.in/2014/08/session-management-using-sql-azure-and.html
At the bottom you will find the download link of sample.
http://sanganakauthority.blogspot.com/
- Marked as answer by kunal chandratre Tuesday, August 5, 2014 12:23 PM
Tuesday, August 5, 2014 12:23 PM