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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:33:28+00:00 2026-06-10T13:33:28+00:00

I manage shared session state across 2 production web servers using SQL Server database.

  • 0

I manage shared session state across 2 production web servers using SQL Server database.
Recently I realized (And I am almost sure that this wasn’t the case before) that the session is not really shared when jumping from server to server.

Both servers run the same website on the same domain and are balanced using a hardware load balancer. Both run under IIS7. And in both servers the ASP.NET State Service is running.

When inspecting the HTTP headers and cross referencing with SQL profiler captures I found what I think might be the problem.

The SessionId value in my cookies is a 24 character string, e.g: y4hfairc2xbwlupkdsqpv0nz

The SessionID as recieved by the ASPState database and as stored there is longer and has server specific 8 character postfix. e.g. 2476b033 or 2b7731d2 which is consistent across all sessions stored in the database.
The SessionIDs therefore look like: y4hfairc2xbwlupkdsqpv0nz2476b033 or y4hfairc2xbwlupkdsqpv0nz2b7731d2

Obviously because of that the session is not shared and each server maintains its own session state.

Anyone using a similar configuration that might have encountered this before?

Thanks

update

Turns out here: SessionId saved in SQL Server is different from the one generated from the asp.net runtime that the extra characters are the IIS AppID. Now I have to find out how to change it so both servers will match. So far no luck.
Anyone?

  • 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-06-10T13:33:30+00:00Added an answer on June 10, 2026 at 1:33 pm

    Answering my own question for completeness.

    Thanks to this: https://serverfault.com/questions/288981/load-balanced-iis-7-5-web-server-asp-net-session-state-problem

    I found out how to match the AppIDs.

    Everything seems to work great now.

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

Sidebar

Related Questions

I am using Subversion to manage code for a web app. There are shared
I have very recently started using a Bzr shared repository to manage my project.
Are session variables in the global $_SESSION array shared across scripts? Lets say I
I would keep some data in shared memory, using named semaphores to manage access:
We use Asp Classic with VBScript and SQL Server 2005. Websites are hosted on
I have a Java web application which stores some data in the session. The
I want to access a shared mailbox (NOT FOLDER) via Javamail API (1.4.5) using
I'll be using a shared Internet connexion starting this September at my school and
How can I manage page state history in share (surf?) so that I remember
I have one ASP.NET web application running at the web server root which provides

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.