如何发送和asp.net接收数据串口或USB端口? [英] how to send and receive data to serial port or USB port in asp.net?

查看:712
本文介绍了如何发送和asp.net接收数据串口或USB端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个停车的Web应用程序,我瓦纳控制门的方式入口与连接到USB端口,但我们知道,浏览器的设备处于沙盒,所以到计算机的端口没有访问我在网上搜索,发现有一些可能性,通过ActiveX和/或Java小程序这样做,但我是新手,这些东西,想描述它,或者相对于结果,即使类库一个完整的教程或维基书
我想通过asp.net应用程序(客户端)我知道,浏览器都无法做到,因为安全问题,所以如果有人给我提供的ActiveX的一个例子,我将AP $ P $将数据发送到USB或COM端口pciate。

I am developing a web application for a parking i wana control gate ways entrance with a device connected to usb port but we know that browser is in "Sand Box" so no access to computer's port i search the web and found out there is some possibility to do so via ActiveX and / or Java Applets but i'm novice to these thing and want a complete tutorial or a wiki book that describe it or even class libraries relative to
I want to send data to a USB or COM Port via asp.net application (Client Side) i know that browser's aren't able to do so because of security issues if anyone provide me an example of ActiveX i will be appreciate.

在预先感谢赛义德Soleimanifar

Thanks in Advance , Saeed Soleimanifar

推荐答案

您需要托管asp.net网应用程序/网站的服务器上您的浏览器客户端计算机。你的客户会从服务器和网​​站无法客户机上托管请求的页面。所以,你可以将设备连接到服务器计算机和客户端发送您请求后,通过设备例如GSM调制解调器的数据。现在,您需要将设备连接到服务器,并可以使一个窗口服务,从数据库中提取的信息发布设备,通过张贴他们。

You need to host asp.net net application/website on a server your browser is a client machine. Your client will request a page from server and website could not be hosted on client machine. So you can connect your device to server machine and client sent you request to post data through device e.g gsm modem. Now you need to connect your device to server and you can make a windows service to pull the posted message from database to post them through device.

您需要跟COM端口,甚至你的USB设备监听COM端口。可以使用串行端口类设备进行通信。您可以使用桌面应用程序和为此,我看不到任何理由使用网站。下面的链接将帮助你。

You need to talk to COM port, even your USB devices listen to COM port. You can use serial port class to communicate with device. You can do this with desktop application and I could not see any reason for using website. The following links will help you.

这篇关于如何发送和asp.net接收数据串口或USB端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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