Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7549065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:51:26+00:00 2026-05-30T09:51:26+00:00

I am working on an ASP.Net Full-Ajax site. Because all operations have doing by

  • 0

I am working on an ASP.Net Full-Ajax site. Because all operations have doing by Ajax requests, any postback request will not send to server.In other hand I have a javascript timer that send an ajax request to check sessions and if it expired redirect user to login page.

Problem is here: When user is working on page for 20 minutes and all operations will do with ajax requests after 20 minutes its session expired and user will redirect to login page (by that javascript timer) exactly during working with page. So I need to refresh its session state with ajax request. But how ?How can I do that to reset sessions state timeout by an ajax request!?!!

Depend on my Google search results, I can not be preform by ajax request because SessionId store in client as a cookie and to update it need to preform a post back request 🙁

Note : Session state is set on InProc mode with timeout = 20

Sorry about my bad English syntax, I am new in English

Regards, Foroughi

UPDATE : Does an ajax request update sessions state timeout?!!

UPDATE : When my user login to site I set a session like this :

Session["UserId"] = UserObject.Id;

and in all my page I use some web method to preform operation like this :

[WebMethod]
public static Opr1 (Paramethers...)
{

   //Question is here , how can i update UserId  session to prevent to expire,how can i update it

   //execute my codes to preform Opr1

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:51:27+00:00Added an answer on May 30, 2026 at 9:51 am

    If you are using WebMethods you should decorate your methods like

    [WebMethod(EnableSession = true)]
    

    Further if you need to keep your session alive you should try create an HTTPHandler that implements IRequireSessionState this interface allows to get/set(deserialize/serialize) the session variables that will eventually slide session timeout.

    This is a good article about the sessions and ajax calls.

    http://seejoelprogram.wordpress.com/2008/11/10/maintaining-aspnet-session-state-in-an-ajax-application/

    Hope this will be helpful

    Regards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net page within which I've used several AJAX controls doing partial
I'm currently working on a ASP.NET MVC site where we have to run in
I have an asp.net ajax website, it full of things happen on the same
I am working on asp.net application and I have generated entity model (edmx) from
I am working on asp.net 3.5 application. I have a datagrid. I want to
I am working on asp.net application and I have an update panel like this:
I have an asp.net mvc app with a route that allows users to request
I have two physical servers. The old one runs an ASP.NET site on IIS
I'm working on an ASP.NET web application for our corporate intranet users. I have
I have been working on ASP.NET MVC for a while and loving it so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.