Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ASP.NET Session data after crash

Posted on 2013-12-17
5
578 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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

856 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