当来自同一域、不同处理程序的流文件时,AJAX 请求挂起

发布于 2024-08-31 01:53:19 字数 283 浏览 3 评论 0原文

我从某个页面向某个 ASHX 处理程序发起 GET 请求,该处理程序将文件流式传输到客户端。浏览器下载对话框打开,下载工作正常。

当我想继续与页面交互时,问题就出现了。交互向某些(不同的)处理程序发起 AJAX 请求,以用内容填充页面。 但是,只要下载仍在运行,服务器就不会返回任何请求。

在下载完成之前,请求不会返回并允许与页面交互。

我在调试 IIS 7 服务器和生产 IIS 6 服务器上遇到此问题。该应用程序是 .NET 3.5 上的 ASP.NET。

谁能告诉我发生了什么事吗?

From some page I launch a GET request to some ASHX handler that streams a file to the client. Browser download dialog opens, download works fine.

The problem arises when I want to continue to interact with the page. Interacting launches AJAX requests to some (different) handler to fill the page with content.
But, as long as the download is still running, no request will come back from the server.

Not before the download has finished will the requests return and allow interaction with the page.

I have this problem on a debugging IIS 7 server and a production IIS 6 server. The application is ASP.NET on .NET 3.5.

Can anyone tell me what is going on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扶醉桌前 2024-09-07 01:53:19

ASP.NET 序列化访问同一会话对象的所有请求以进行写入。

请参阅这篇文章Inproc 模式下页面只读的会话锁定争用 了解更多信息。还有另外一个,但我找不到。

ASP.NET serializes all requests that access the same session object for writing.

See this post Session Lock Contention with Page Readonly in Inproc Mode for some more information. There is another one but I can't find it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文