11 February 2008
Session expiration in ASP.NET is a nasty problem. Imagine yourself filling a long form, hitting submit then boom you get the login page! That happened to me before and probably happened to you.
This problem doesn’t have an out-of-box solution in ASP.NET and there are different appraoches to solve it.
- Increasing the session time out. Probably you are aware of the cons of this problem which are mainly consuming more server resources.
- Having an image or an iframe that refreshes regularly and requests the server. This approach is a per page approach and you can select the pages to implement it on.
Personally, I’ve been using the second approach for a long time and didn’t have any problem with it. However, I made it more reusable, not to mention “cleaner”, by making it a web control.
If you are just interested in using the control then you can skip to the last section “Using the Control.”Tagged under:12 comments|
- Ten Software Keywords That Make You Look Smarter
- Implementing a CQRS-based Architecture with MVC and Document DB
- Five Essential Front-End Tools That Should be Used with Modern MVC Projects
- A Call To Drop “The Open Closed Principle” From The SOLID Design Principles
- You should unit test your controller, NOT!
© Copyright 2007 - 2013, all rights reserved for Adam Tibitop