开发者

Unable to load webpage after doing AJAX request

开发者 https://www.devze.com 2023-01-17 12:43 出处:网络
I have a page that does an AJAX request. This request can take a while to complete, sometimes over a minut开发者_开发技巧e. This is not an issue.

I have a page that does an AJAX request. This request can take a while to complete, sometimes over a minut开发者_开发技巧e. This is not an issue.

During the AJAX request I am unable to load any other pages on the website. This is the same for any web browser.

I understand that there are connection limits in the browser, IIS and ASP.NET - but all of them allow at least 2 connections.

I am using IIS7 and ASP.NET 4.0.

I have made some sample code that demonstrates the issue. The code is here: http://pastebin.com/A4WqUMbp

See a video of the issue here: http://www.screencast.com/users/steel_andrew/folders/Jing/media/d53f74e2-5fb7-44a7-b641-526d9d4d5f0a You can see in the video the 2nd tab that is opened does not return a page until the AJAX request is complete.

Any help would be greatly appreciated.

Thanks, Andrew


I dont know ASP but if your using a session then you can only run one script with an open session at a time, that only applies for PHP but i would check cus i had that problem.


It's unclear as what you mean by

During the AJAX request I am unable to load any other pages on the websiteload any other pages on the website.

Are you saying that page rendering stops for current page or are you saying that browser itself stalls and user is unable to do anything?load any other pages on the website? Are you sure AJAX call you're referring to is really Asynchronous? Could you share the actual piece of code that does it.


I've found the answer to my question. kizzie33 was right, it is a session issue.

According to Microsoft:

Access to ASP.NET session state is exclusive per session, which means that if two different users make concurrent requests, access to each separate session is granted concurrently. However, if two concurrent requests are made for the same session (by using the same SessionID value), the first request gets exclusive access to the session information.information.

Taken from the MSDN page on ASP.NET Session State Overview

0

精彩评论

暂无评论...
验证码 换一张
取 消