简体   繁体   中英

Page hangs when leaving it for a while using ASP.NET Ajax

I'm working on a business application using ASP.NET Ajax , NHibernate and Spring.Net, I've got an annoying problem. The problem is that when I leave page for about 5 minutes and then return back and try to make any action that posts back, it displays wrongly (if there are controls hidden by style it became visible). In addition, the page didn't post back to the server.

Also the problem happens when opening two different tabs, different pages (Each page uses session but different keys )

Thanks in advance

As you describe the problem, its sounds that connect the content of the page with the user cookie and session, and when the session expired the application did not take care to recreate it.

So the post back fail because the session data have been lost when the page ask for them / need them to work and display correct the results.

This is the issue that I diagnose, how you fix that is up to you :)

Possible solutions

  1. Change the logic of the page creation.
  2. While the user is on page do not let the session ends (not good practice)
  3. Store the user data of the page, on a database - connected with the user, and delete it after some days if not have been updated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM