Dealing with expired session for a partially filled form?

Posted by aaronls on Stack Overflow See other posts from Stack Overflow or by aaronls
Published on 2010-03-11T16:49:23Z Indexed on 2010/03/11 19:04 UTC
Read the original article Hit count: 294

Filed under:
|

I have a large webform, and would like to prompt the user to login if their session expires, or have them login when they submit the form. It seems that having them login when they submit the form creates alot of challenges because they get redirected to the login page and then the postback data for the original form submission is lost.

So I'm thinking about how to prompt them to login asynchrounsly when the session expires. So that they stay on the original form page, have a panel appear telling them the session has expired and they need to login, it submits the login asynchronously, the login panel disapears, and the user is still on the original partially filled form and can submit it. Is this easily doable using the existing ASP.NET Membership controls? When they submit the form will I need to worry about the session key? I mean, I am wondering if the session key the form submits will be the original one from before the session expired which won't match the new one generated after logging in again asynchrounously(I still do not understand the details of how ASP.NET tracks authentication/session IDs).

Edit: Yes I am actually concerned about authentication expiration. The user must be authenticated for the submitted data to be considered valid.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-membership