Reputation: 345
We have one ajax request that refresh some counter in our layout page. The ajax request is made all 2 minutes.
but with this request the session never expire unless the user logout or close the browser. How can I make an action that do not refresh the session expiration ?
Upvotes: 2
Views: 1588
Reputation: 1124
I'm under the impression that if you don't use the Session (read/write) it won't slide. But you can apply the SessionState attribute to your controller to disable it to that controller (it won't work at action level though).
[SessionState(System.Web.SessionState.SessionStateBehavior.Disabled)]
public class AjaxController : Controller
{
}
Upvotes: 2