ASP.NET(Gsm调制解调器)中的串行端口访问 [英] Serial Port access in ASP.NET(Gsm Modem)

查看:91
本文介绍了ASP.NET(Gsm调制解调器)中的串行端口访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在asp.net应用程序中访问串行端口gsm调制解调器?

Is it possible to access serial port gsm modem in asp.net application?

推荐答案

是.

网上有很多如何执行此操作的示例. Google是您的朋友.
Yes.

There are loads of examples on the net of how to do this. Google is your friend here.


客户端或服务器上的串行端口?

在客户端上几乎是不可能的,并且需要诸如ActiveX组件之类的东西.

在服务器上直接执行此操作不是一个好主意,因为代码的目的是提供页面,而侦听串行端口将意味着没有页面发送到客户端.另外,您可能会遇到冲突,因为多个客户端可能会尝试打开串行端口,而这将无法正常工作.因此,最好创建一个在服务器上运行的服务,并进行串行端口通信和某种形式的asp.net通信.这可以通过让该服务监视目录来实现.当然,不建议直接与端口通信,因为存在asp.net页通常不具备的权限.

祝你好运!
serial port on the client or server?

On the client would be nearly impossible and would require something like an ActiveX component to do that.

On the server it would be a bad idea to do it directly because the purpose of the code is to serve a page and listening to the serial port would mean that there is no page sent to the client. Also, you would encounter collisions because it is possible that multiple clients would try to open the serial port and that wouldn''t work. So, it would be best to create a service that runs on the server and does the serial port communication and some sort of communication asp.net. This could be by having that service monitoring a directory. It is certainly not advised to communicate to the port directly because there are the permissions needed that an asp.net page normally doesn''t have.

Good luck!


这篇关于ASP.NET(Gsm调制解调器)中的串行端口访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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