Click here to Skip to main content
Sign Up to vote bad
good
See more: ASP.NETMVC3
Hi!
 
When my mvc3 ASP.NET app timeout I want it to redirect to login page that tells the user that they are timed out.
Posted 11 Nov '12 - 23:08
apr1234544

Comments
ryanb31 - 12 Nov '12 - 8:43
You'll need to track it using JS. Web applications are disconnected so you need a timer that is keeping track of it in JavaScript.
apr1234 - 14 Nov '12 - 5:08
Can you please provide the required javascript for the time out. Actually in MVC we dont have any timers...
ryanb31 - 14 Nov '12 - 7:40
There are lots of examples on the web. It's a little too involved to do here. Essentially you write out the session timeout value into a hidden field and then using setTimeout you fire a JS function every minute that increments a counter. But, you also have to have code that resets the counter.
Aman.A - 12 Nov '12 - 8:44
have a go at this: Timeout Redirect

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 365
1 OriginalGriff 315
2 Slacker007 240
3 Dave Kreskowiak 212
4 Aarti Meswania 210
0 Sergey Alexandrovich Kryukov 8,893
1 OriginalGriff 7,134
2 CPallini 3,678
3 Rohan Leuva 3,036
4 Maciej Los 2,428


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 12 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid