Asp.net enddate session duration?

As an extension of an asp.net session , each request extends the end date of the session , and is it enough to call void () with ajax to the end. Session end date for another time period (default is 20 minutes or so ...)

public void ResetSessionTime()
{

}

or I need to somehow invoke the session:

public void ResetSessionTime()
{
    User currentUser = HttpContext.Current.Session[userSessionKey] as User;
}

How does a simple query extend the end date of a session?

This question claims that each post-back extension of the session ...

This is the MSDN about session state providers:

"Each session created by ASP.NET has a timeout value (20 minutes by default) associated with it. If the session does not access the session during the session timeout, the session is considered to be expired and is no longer valid."

How to request access to a session exactly?

: # , , ,

EDIT:

, IHttpHandler, ...

public class KeepSessionAlive : IHttpHandler, IRequiresSessionState
{
    public void ProcessRequest(HttpContext context)
    {
        context.Session["KeepSessionAlive"] = DateTime.Now;
    }
}
+5
1

, , reset. - ASYNC.

, , AJAX . ( ASP.NET Open/Alive)

+2

All Articles