asp.net http server push to client [closed]

こ雲淡風輕ζ 提交于 2019-11-27 20:10:06
Christoph

Since you mention ASP.NET you should be using SignalR. See my other answer here: Instant notifications like Facebook

The push technique you are looking for is called Comet. See this article for some pointers.

I would create a script callable Web Service and use JQuery.

Here's a good guide on using JQuery to call an ASP.NET (ASMX) web service:

http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/

Now, you would just poll this web service at whatever interval makes sense for your application.

Also, the problem with ASP.NET AJAX is it's a bit top heavy. By using JQuery, you can call your web service from a regular ASP.NET web form, from a View in MVC, or actually using any other web technology (classic ASP, PHP, whatever) all from the client side using just, in my view, the best javascript framework around. :)

Try out WebSync, a scalable comet server built for .NET/IIS. It'll let you push data nicely from the server, and integrates super easily with ASP.NET projects (a couple web.config entries is all it takes).

PokeIn is a reverse ajax library for ASP.NET & Mono. It has various capabilities like .NET to JSON vice versa. You may download sample projects from here

To do that, use ASP.NET 3.0/3.5 or if you are using earlier versions, use ASP.NET Ajax. However both examples listed by you, are using Ajax to pull information, not push it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!