I am working on an ASP.Net Full-Ajax website. Since all operations are performed on Ajax requests, any postback request will not be sent to the server. In the other hand, I have a javascript timer that sends an ajax request to check sessions and, if it has expired, redirects the user to the login page.
The problem here is: when the user works on the page for 20 minutes, and all operations will be performed using ajax requests in 20 minutes, the session has expired, and the user will be redirected to the login page (with this javascript timer) exactly while working with the page. Therefore, I need to update the session state using an ajax request. But how? How can I do this with a reset state timeout session using an ajax request!? !!
Depending on the results of Google search, I canβt be stub using an ajax request, because the SessionId store is on the client as a cookie and to update it you must first request a response for feedback: (
Note : session state is set in InProc mode using timeout = 20
Sorry for my poor English syntax, I'm new to English
Regards, Foroughi
UPDATE : does the ajax request update session check the status? !!
UPDATE When my user visited the site, I scheduled the session as follows:
Session["UserId"] = UserObject.Id;
and throughout my page I use some kind of web method to work with the stub as follows:
[WebMethod] public static Opr1 (Paramethers...) {
source share