C#.net webform, avoid losing data from session timeout -
i have user complaining frequent timeouts in intranet web page. while looking solution found post:
http://forums.asp.net/t/152925.aspx?pageindex=1
where poster recommends intercepting redirect login page, submit data database, either reauthorize user (without knowledge) or redirect login page. goal avoid situation user enters data in form, walks away, comes submit it, told have login again (which fine, if data remained , user sent right original webform).
does know how can accomplish on specific pages in app (not of them)?
it's not trivial, can add ajax component makes occasional calls page keep session alive. way lengthen session particular page need without affecting application whole.
edit
if want let session expire, keep form data, can implement
protected void application_postauthenticaterequest (object sender, eventargs e)
event handler in global.asax.cs file. called before forms authentication redirect happens, , form data available application @ point, can persist whatever medium necessary until user authenticated again. in addition, if check
((httpapplication)sender).request.path
property tell page requested.
Comments
Post a Comment