如何在ASP中执行长轮询AJAX请求。净MVC吗?(复制)

时间:2022-09-03 04:15:04

This question already has an answer here:

这个问题已经有了答案:

Does anyone know how to code up long-polling AJAX requests (for server PUSH notifications) in ASP.NET MVC? Whenever I do it, it seems that only the last browser to open up a window gets the notifications. As if IIS/ASP.NET were canceling the last request because it was hung or something.

有人知道如何在ASP中编码长轮询AJAX请求(用于服务器推送通知)吗?净MVC吗?每当我这样做的时候,似乎只有最后一个打开窗口的浏览器才能收到通知。如果IIS / ASP。NET取消了最后一个请求,因为它被挂起了。

1 个解决方案

#1


33  

I recently wrote a simple example of a Long Polling Chat Server using MVC 3 Async Controllers based on a great article by Clay Lenhart

我最近根据Clay Lenhart的一篇伟大的文章,编写了一个关于使用MVC 3异步控制器的长轮询聊天服务器的简单示例

You can use the example on a AppHarbor deployment I set up based on the source from the BitBucket project.

您可以使用我基于BitBucket项目的源代码建立的AppHarbor部署示例。

Also, more information available from my blog post explaining the project.

同时,更多的信息可以从我的博客文章中得到。

#1


33  

I recently wrote a simple example of a Long Polling Chat Server using MVC 3 Async Controllers based on a great article by Clay Lenhart

我最近根据Clay Lenhart的一篇伟大的文章,编写了一个关于使用MVC 3异步控制器的长轮询聊天服务器的简单示例

You can use the example on a AppHarbor deployment I set up based on the source from the BitBucket project.

您可以使用我基于BitBucket项目的源代码建立的AppHarbor部署示例。

Also, more information available from my blog post explaining the project.

同时,更多的信息可以从我的博客文章中得到。