如何在Asp.net应用程序中的Sever和客户端之间进行双工通信 [英] how duplex communication between Sever and Clients in Asp.net Application

查看:88
本文介绍了如何在Asp.net应用程序中的Sever和客户端之间进行双工通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want duplex communication between Sever and Clients.

My Server PC have web Application And On my Clients PC Have local DB and windows Application. if my Clients do some transaction using window application ,I want to know the updated form of Data of Clients Local DB(SQL server).

Note 1) Client PC using Router base Internet ,Mean the IP of Client PC Is Change after hour or sometime after 24 hour,because its not Static .its Proxy IP (Public IP) Note 2) Client PC is not on LAN network. and i don't want its too.

NOTE 3) I don't want to allow Remotely Access on Client SQL SERVER.

NOTE 4) Clients Are more than 100 and Not on LAN or work group.(e.g one client in usa,one client in UK and one in France and so on) ,they are using a same Window application.

Note 5) Clients PC can access Server via Services.But Problem is Server can't access Client Pc cuz of Clients pc having Dynamic IP,not static ip Due to Router use..

Please give me Good Trick to handle this Type of Issue. what should i use in my Server Web application for dublix communication with Clients...websercvices or SingleR or WebSocket or any trick in your mind ? the main issue i can't get static ip of Client pc via internet connectivity.so what should i do now??

Thanks you !

推荐答案

通常,Web应用程序不是为双工通信而设计的。最初,HTTP旨在支持纯客户端 - 服务器。这里的问题是服务器推送。请参阅我过去的答案,讨论相关问题和下面引用的文章:

网站帐户的应用信息中心 [ ^ ],

http:// en.wikipedia.org/wiki/Client-server_model [ ^ ],

http://en.wikipedia.org/wiki/Server_push [ ^ ],

http://en.wikipedia.org/wiki/Pull_technology [ ^ ]。



但是,有一些方法可以解决这个问题;它们不是很简单。首先,您可以考虑使用双工 Web服务。请参阅此CodeProject文章: Duplex Web Services [ ^ ]。



您还可以考虑使用一些服务器推送方法,特别是SignalR(请参阅我上面第一个链接引用的过去答案中的链接)。



-SA
Normally, Web applications are not designed for duplex communications. Originally, HTTP was designed to support pure client-server. The problem here is to have server push. Please see my past answer discussing related problems and the articles referenced below:
Application 'dashboard' for website accounts[^],
http://en.wikipedia.org/wiki/Client-server_model[^],
http://en.wikipedia.org/wiki/Server_push[^],
http://en.wikipedia.org/wiki/Pull_technology[^].

However, there are some ways to work around the problem; they are not very simple. First, you can think about having a duplex Web Service. Please see this CodeProject article: Duplex Web Services[^].

You can also consider using some of the server push approaches, in particular, SignalR (please see the links in my past answer referenced by my first link above).

—SA


这篇关于如何在Asp.net应用程序中的Sever和客户端之间进行双工通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆