且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过MS-SQL和ASP.NET立即发送和接收

更新时间:2022-11-28 11:43:24

我假设您正在使用SQL Server数据库。请参阅此链接,这可能会有所帮助。



使用查询通知[msdn] [ ^ ]



问候..:笑:
I assume you are using SQL server database. Refer this link it might be helpful.

Using Query Notifications [msdn][^]

Regards..:laugh:


如果这是一个Web应用程序,您正在使用IIS来提供您的asp页面(我假设你用标记的方式),你可能想看一下SignalR。它是一个向Web客户端发送通知的框架,没有轮询的开销。



使用SignalR,通知的逻辑被移入服务器。因此,当您的用户请求某些内容并且该请求被授予时,当您将该请求发送回客户端时,您也可以通过SignalR通知任何听众。该体系结构超出了这一响应范围,但SignalR上有很多内容以及如何在连接的Web应用程序的通知中使用它。
If this is a web app an you are working against IIS serving up your asp pages (which I assume by what you tagged the question with) you will probably want to look at SignalR. It is a framework for notifications to web clients without the overhead of polling.

With SignalR, the logic for notifications is moved into the server. So when your user requests something and that request is granted, when you are sending that back to the client you can also notify any "listeners" via SignalR. The architecture is beyond this response but there is a lot out there on SignalR and how to use it in notification of connected web apps.