views:

184

answers:

2

I created a website which loads an a question pool from an XML file and generates random tests for my users to practice for an exam. Some of the tests take a while for the user complete, and they may not finish it all in one sitting, so I would like for people to be able to come back later and finish up their tests during multiple sessions. The catch is, I would like to do this without requiring the user to go through a signup/login process. I just want to store the current state of the randomized practice test somewhere and then somehow they come back to it and pick up right where they left off. It is also important that other people cannot modify other peoples tests if that is avoidable.

My current plan is to generate a GUID for each test, store serialized XML of the current state in a database, give the user a unique URL to return to and ask the user to input a password when they start/return to a test. Once they finish the test, or a set time passes with no activity, I would destroy the test to keep the database clean.

Am I overlooking any problems with accomplishing my goal? What other ways would you accomplish this task in ASP.NET MVC (2)?

+1  A: 

Persistent cookies on users computers comes to mind. You might store the user state in a database and sore the primary key in a cookie which will allow you to later identify users. Of course this approach has limitations and might not be applicable in your scenario.

Darin Dimitrov
+1  A: 

The scenario you describe is comparable to an anonymous user when you use the built in Membershipsystem/Profilesystem of ASP.NET. You could try to start with that.

Malcolm Frexner
This was basically exactly what I wanted without the overhead of writing a custom system, thanks for the suggestion.
NickLarsen