English 中文(简体)
如何使 ASP.NET 网站与 TCP 服务器应用程序进行通信
原标题:How to make a ASP.NET website communicate with TCP server application

我有一个架构,通过服务器应用程序管理和监测一些硬件(通过TCP Sockets连接,并更新硬件数据库),还有一个星盘网络网站,用户可以通过该网站通过 tcp 服务器获得硬件的实时状态。 tcp 服务器和网站将在同一台机器上托管。

我的问题是,我怎样才能让超能ER 和TCPSERVER互动呢?

我遇到的一个方法就是在窗口服务中建立 tcp 服务器, 并在其中主机 wcf, 并创建 asp. net 网站来使用这项服务。 但是, 我是一个全新的人, 我对此感到困惑。 所以, 请告诉我这个解决方案是否适用于我的问题。 如果是, 请详细说明如何做到这一点 。

最佳回答

This is one of possible realizations. Since your applications (IIS hosted web site and Windows Service application) are on the same machine you should use NetNamedPipeBinding (because it is the fastest WCF communication available on single machine).

您的 HTTP 应用程序和 Windows Service 之间还有其他沟通方式, 但这个方式快速、 可靠且容易执行。 我当然愿意这样做 。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签