Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello everyone, I have this scenario:

1. A user login successfully; hence, they are authenticated, session variable is created and user email and password are stored in the cookies

2. The user is now using the site and they are on ~/product/myexample.aspx, which requires authentication to access

3. The user filled in the form on this page but did not submit to the server

4. The user left the computer idle for 30 minutes and came back to continue working on the form

5. By now, the session has timeout and user no longer authenticated.

6. When the user clicked submit button, I would love to re authenticate and create session variable using the cookies and submit all the data on this page without losing the information the user has filled in

I found some article using jquery to keep the session alive ( http://www.dotnetcurry.com/showarticle.aspx?ID=453 ) hence keeping the user authenticated. However, it doesn't work on mobile devices since those devices go to sleep after some times. Moreover, I also found that there are issues with the application pool idle time out, which cause the users to be redirected to login page.

Would appreciate it if you could shed some light.

thanks.
Posted
Comments
Peter Leow 12-Mar-15 21:18pm    
Not advisable, how to make sure it is the same person the second time? It defeats the purpose of session timeout.
ryannz 12-Mar-15 21:22pm    
Thanks Peter. Yes you are right. However, in my case it's the requirement that the user doesn't lose whatever data they have already filled in. Sometimes it can take more than 30 minutes to complete the form.
Dave Kreskowiak 12-Mar-15 23:24pm    
The problem you should be tackling is that it takes users 30 minutes to fill in a form. You should be doing this process in stages, not all at once. That way, if the users session gets disconnected for whatever reason, they just need to fill in the last known good position in the input process, not the entire form.
MOHANAVAMSI CHIDIPILLI 13-Mar-15 13:16pm    
Hello Ryannz just browser will store the state of that text box if your permit... so when user selected that textbox he will get a suggestions based on previous entered values...
Arkadeep De 15-Mar-15 13:08pm    
hi ryannz,
I have a question on your application. If user are authenticated from cookies after session has expired, then what is the logic behind the session out as user has to do nothing(logging again)...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900