客户端使用ASP.net访问服务器中的COM端口 [英] COM port access in server by client using ASP.net

查看:197
本文介绍了客户端使用ASP.net访问服务器中的COM端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


I(客户端)如何使用Web服务或任何其他方式(使用asp.net )访问服务器的COM端口

Hi,
How can I(client) access server''s COM Ports using web service or any other way (Using asp.net)

推荐答案

使用Web服务"(或ASP.NET等)是什么意思?首先,您需要创建这样的服务.如果您已经拥有这样的服务或Web应用程序,请查看该服务的规格.

如果要创建此类服务,请使用类 System.IO.Ports.SerialPort.本主题中的帮助MSDN页面是全面的: http://msdn.microsoft. com/en-us/library/system.io.ports.serialport.aspx [ http://msdn.microsoft.com/en-us/library/ms731758.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/ee939340.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/bb157685.aspx [ ^ ],

要了解Windows Services的开发,请从此处开始:
http://msdn.microsoft.com/en-us/library/d56de412%28v = VS.100%29.aspx [ ^ ].

—SA
What do you mean "using Web service" (or ASP.NET or whatever)? First of all, you need to create such service. If you already have such service or Web application, look at the specs of that service.

If you are going to create such service, use the class System.IO.Ports.SerialPort. The help MSDN page in this topic is comprehensive: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx[^]. Create an interface you want to expose, implement it using this class and expose as a Web service or Web page interface.

You can also implement a more effective and easier to implement custom service using classical remoting of WCF, self-hosted by the service. The last way is the most straightforward and most recommended by Microsoft for all new development. The best form of such custom service would be a Windows Service.

See:
http://msdn.microsoft.com/en-us/library/ms731758.aspx[^],
http://msdn.microsoft.com/en-us/library/ee939340.aspx[^],
http://msdn.microsoft.com/en-us/library/bb157685.aspx[^],

To learn development of Windows Services, start here:
http://msdn.microsoft.com/en-us/library/d56de412%28v=VS.100%29.aspx[^].

—SA


这篇关于客户端使用ASP.net访问服务器中的COM端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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