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 954349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:12:09+00:00 2026-05-16T00:12:09+00:00

I am doing a jquery $.post(‘/Home/jQueryRateForumItem’, but when I get to my controller the

  • 0

I am doing a jquery $.post(‘/Home/jQueryRateForumItem’, but when I get to my controller the session id is always different on each post.

I have tried;

        string g = HttpContext.Session.SessionID;
        string session = base.Session.SessionID;

I’m pretty sure The session id shouldn’t change but can’t for the life of me think how to fix this.

EDIT

It’s happening when I refresh the Index page as weel so not just on ajax postbacks. I am using cassini and not IIS though this is the first time I’ve had issues

  • 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-16T00:12:09+00:00Added an answer on May 16, 2026 at 12:12 am

    I can’t see anything wrong with your code and I couldn’t reproduce the behavior you are describing. By default sessions are tracked by cookies so make sure that you’ve enabled cookies on your browser or it might create a new session on each request.

    Also make sure you store a value into the session or the session cookie won’t be created. Let’s take for example the following controller:

    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewData["Message"] = base.Session.SessionID;
            return View();
        }
    
        public ActionResult About()
        {
            return View();
        }
    }
    

    First navigate to the Home action, then go to About and when you come back to Home the session id changes. That’s normal as nothing was stored into the session. If you simply set some value Session["foo"] = "bar"; it will work as the session cookie will be set by the server.

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

Sidebar

Related Questions

I have a page that uses jQuery's $.post() method to get some html and
I have enabled SSL and I am doing a jQuery AJAX post request and
I'm doing a jQuery AJAX post like this: var form = $(#formid); form.submit(function() {
I'm trying to get the principles of doing jQuery-style function chaining straight in my
Doing some jquery animation. I have certain divs set up with an attribute of
Anyone have a sample of doing a jQuery notification/popup/calendar in Intraweb ? A simple
I can disable one and one by doing this: jQuery('#ListBoxA').attr('disabled','true'); But how can I
I have some jquery code that is doing an ajax lookup and returning comma
I have a form which I'm using jQuery to post and working to handle
I am doing a insertBefore in jQuery $.post('/blah', { blah : some data },

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.