I use slidingExpiration session on my web site. And I also added ajax call to check each 15 min session expiration to redirect user on login page. Is it possible to not extend session when this ajax is called?
Asked
Active
Viewed 643 times
0
-
I don't know anything about this session expiration mechanism, but you can check if it is ajax call with HttpContext.Request.IsAjaxRequest(), you can write custom ajaxonly attribute for controller actions: http://helios.ca/2009/05/27/aspnet-mvc-action-filter-ajax-only-attribute/ – 0lukasz0 Apr 23 '12 at 13:56
1 Answers
0
Answer found. To avoid session expiration extend, mark controller by [SessionState(SessionStateBehavior.Disabled)] attribute

Yara
- 4,441
- 6
- 42
- 62