locked
How to restore the previous session after power failure RRS feed

  • Question

  • User214570642 posted

    Hi,

    I want to know how i can restore the same page after power failure or any uncertain situation for the particular user.

    Please suggest me the solution for the problem.

    Sunday, August 19, 2012 11:40 AM

Answers

  • User1954304945 posted

    Hi, you can create a database table to store the current user status, for example, after finishing one question, it will update the database status, for example, one student just finished “Question 5”, you can store “5” into database table column, if power fails at this time, “5” persists in database. When the user logins in again, you can check his status(value: “5”), and redirect the user to the next Question (“Question 6”).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 22, 2012 9:47 PM

All replies

  • User197322208 posted

    http://support.microsoft.com/kb/317604

    Sunday, August 19, 2012 11:54 AM
  • User214570642 posted

    Thanx for the reply..

    But

    Actually I designed a page for student online exam .

    If any uncertain situation occurs and the machine turns-off..

    The exam of the student should carry on with the page of exam application and time remaining, after restarting the machine..

    Please give me a solution for this problem..

    Monday, August 20, 2012 10:38 AM
  • User-1002157272 posted

    The link  Andrei provided you is to allow for sessions to be persisted out of proc. Doing this would allow you to store sessions for users across system/hardware/power failures, etc. default session state in asp.net is inproc (in memory) which is lost when the application ends by any means.

    For the functionality you are looking for, you may want to consider not relying on sessions at all for the progress of the exam the user is taking. What you could do is build a database that stores the user's progress throughout the entire exam. You could create a table for each page of the exam and store the answers aswell and the time started/completed for that page of the exam. This would give you the ability to check the total time the user has taken so far, how much time remaining, and of course, to continue where they left off in the case of a power failure or other critical errors.

    Monday, August 20, 2012 9:11 PM
  • User-1309697999 posted

    If you want to persist the session data even after the application restart then perhaps you should consider some out-proc session management technique. In case of out-prc sessions the session information lies either in DB or a separate server called state server.

    Go throgh this link to understand the basics of in-proc vs out-porc and try to see if you could implement an out-proc session in your case and get things to work your way.

    http://www.codeproject.com/Articles/416137/Understanding-Session-Management-Techniques-in-ASP

    Tuesday, August 21, 2012 6:14 AM
  • User214570642 posted

    Thanx for the reply,

    but i don't think it will help me..

    Wednesday, August 22, 2012 1:07 AM
  • User214570642 posted

    Thanx for the reply.

    Your suggestion is good but it can overload the server for the exams..

    because there are number of student gives the exam simultenuosly and this can lead to overload of the server..

    application runs slow..

    Wednesday, August 22, 2012 1:14 AM
  • User-1002157272 posted

    using any form of out-of-proc sessions should actually help free up some resources abit if configured correctly, especially if going with a state server. 

    If finding a way to persist user progress throughout the exam will overload the server, you really need to analyze the underlying problem(s).

    Is the application designed poorly and using unnecessary resources? Are you hosting in a poorly managed hosting environment? Definitely things to consider if overloading is an issue.

    Wednesday, August 22, 2012 1:47 PM
  • User1954304945 posted

    Hi, you can create a database table to store the current user status, for example, after finishing one question, it will update the database status, for example, one student just finished “Question 5”, you can store “5” into database table column, if power fails at this time, “5” persists in database. When the user logins in again, you can check his status(value: “5”), and redirect the user to the next Question (“Question 6”).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 22, 2012 9:47 PM
  • User2027025901 posted

    Hi, you can use cookies to store all the student answer and time remaining as well. =D
    where to trigger this "storing event" is your decision.

    Wednesday, August 22, 2012 10:28 PM