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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:16:37+00:00 2026-05-13T01:16:37+00:00

I am not able to make more than one request at a time in

  • 0

I am not able to make more than one request at a time in asp.net while the session is active. Why does this limitation exist? Is there a way to work around it?

This issue can be demonstrated with a WebForms app with just 3 simple aspx pages (although the limitation still applies in asp.net mvc).

Create an asp.net 3.5 web application.

There should be just three pages:
NoWait.aspx, Wait.aspx, and SessionStart.aspx

NoWait.aspx has this single nugget added between the default div tags: <%=DateTime.Now.Ticks %>. The code-behind for this page is the default (empty).

Wait.aspx looks just like NoWait.aspx, but it has one line added to Page_Load in the code-behind: Thread.Sleep(3000); //wait 3 seconds

SessionStart.aspx also looks just like NoWait.aspx, but it has this single line in its code-behind: Session[“Whatever”] = “Anything”;

Open a browser and go to NoWait.aspx. It properly shows a number in the response, such as: “633937963004391610”. Keep refreshing and it keeps changing the number. Great so far! Create a new tab in the same browser and go to Wait.aspx. It sits for 3 seconds, then writes the number to the response. Great so far! No, try this: Go to Wait.aspx and while it’s spinning, quickly tab over to NoWait.aspx and refresh. Even while Wait.aspx is sleeping, NoWait.aspx WILL provide a response. Great so far. You can continue to refresh NoWait.aspx while Wait.aspx is spinning, and the server happily sends a response each time. This is the behavior I expect.

Now is where it gets weird.

In a 3rd tab, in the same browser, visit SessionStart.aspx. Next, tab over to Wait.aspx and refresh. While it’s spinning, tab over to NoWait.aspx and refresh. NoWait.aspx will NOT send a response until Wait.aspx is done running!

This proves that while a session is active, you can’t make concurrent requests with the same user. Requests are all queued up and served synchronously. I do not expect or understand this behavior. I have tested this on Visual Studio 2008’s built in web server, and also IIS 7 and IIS 7.5.

So I have a few questions:

1) Am I correct that there is indeed a limitation here, or is my test above invalid because I am doing something wrong?

2) Is there a way to work around this limitation? In my web app, certain things take a long time to execute, and I would like users to be able to do things in other tabs while they wait of a big request to complete. Can I somehow configure the session to allow “dirty reads”? This could prevent it from being locked during the request?

3) Why does this limitation exist? I would like to gain a good understanding of why this limitation is necessary. I think I’d be a better developer if I knew!

  • 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-13T01:16:37+00:00Added an answer on May 13, 2026 at 1:16 am

    Here is a link talking about session state and locking. It does perform and exclusive lock.

    The easiest way around this is to make the long running tasks asynchronous. You can make the long running tasks run on a separate thread, or use and asynchronous delegate and return a response to the browser immediately. The client side page can send requests to the server to check and see if it is done (through ajax most likely), and when the server tells the client it’s finished, notify the user. That way although the server requests have to be handled one at a time by the server, it doesn’t look like that to the user.

    This does have it’s own set of problems, and you’ll have to make sure that account for the HTTP context closing as that will dispose certain functionality in the asp.net session. One example you’ll probably have to account for is probably releasing a lock on the session, if that is actually occurring.

    This isn’t too surprising that this could be a limitation. Each browser would have it’s own session, before the advent of ajax, post back requests were synchronous. Making the same session handle concurrent could get really ugly, and I can see how that wouldn’t be a priority for the IIS and ASP.NET teams to add in.

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

Sidebar

Ask A Question

Stats

  • Questions 243k
  • Answers 243k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have a look at Detours. Using Detours, you can instrument… May 13, 2026 at 7:47 am
  • Editorial Team
    Editorial Team added an answer Using HQL it would look something like: session.CreateQuery("from Customer where… May 13, 2026 at 7:47 am
  • Editorial Team
    Editorial Team added an answer Well, for the short answer of is it thread safe,… May 13, 2026 at 7:47 am

Related Questions

A customer has a web based inventory management system. The system is proprietary and
This is an interesting problem that I’ve not been able to solve yet. I
I am looking for a more sophisticated way of using Linq to SQL. I
I am looking to use this concept in one of my upcoming project. More

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.