Solved

ASP.NET Session data after crash

Posted on 2013-12-17
5
582 Views
Last Modified: 2014-01-02
I have a web application written in C#, ASP.NET.
The application is not stable and sometimes crashes when users are using it.
After the crash the user brings up the application's logon screen again.
I am storing the session data in the Session object provided by ASP.NET.
Question :
Is it possible to retrieve information of the previous session (the one that crashed) when new logon screen is loading ?
0
Comment
Question by:vu3lmg
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 39725012
No, a crash in a web application will cause the process running the website to restart and therefore lose all of the session data.
The alternative is to store session information in sql server so it can be retrieved after a crash.
0
 
LVL 1

Author Comment

by:vu3lmg
ID: 39725122
Dear jacko72
My question is about extracting the information from the client PC, not the server.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 39725157
Session state is stored on the server not on the client, a client based solution would be to use cookies.
0
 
LVL 1

Author Comment

by:vu3lmg
ID: 39725411
Yes session state is stored on the web-server but even that web-server would use cookies to identify between different users.  Right ?  
I am trying get that information (cookie) after the failure.

Please bare with me for the silly questions / lack of proper terminology, but I am new to the web programming.
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 39725518
The session cookies that a web-server uses are usually in-memory or transient cookies which are kept in temporary so they are lost when a browser is closed or due to a crash.
It is possible to get around this by writing your own cookies to the client or using state server management to manage session state

http://www.beansoftware.com/ASP.NET-Tutorials/Store-Session-State-Server.aspx
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question