开发者

ASP.NET remote COM port access

开发者 https://www.devze.com 2023-04-09 06:32 出处:网络
I\'m building a website in ASP.NET with backend functionality in C#. The idea is that you can connect a device to your own serial port, then go to the website to send the received data from your seria

I'm building a website in ASP.NET with backend functionality in C#. The idea is that you can connect a device to your own serial port, then go to the website to send the received data from your serial port to the website.

I made a simple page which can access 开发者_如何学Pythona serial port but after some thinking I realized I was only accessing the serial port of the computer the server runs on. I'm sure I'll be able to solve this by using two seperate applications, a client and a server. The client will then send the received data through TCP to the server. The problem is that I don't want two seperate applications, I want only one application, the website.

I'm not sure if this is possible, so my question is: Is this possible and how can it be done? Thanks in advance!


The only way you could do it is to build a custom browser plug-in, such as an ActiveX control. But, that limits you to using Internet Explorer. Even then, i think IE now has too many protections to allow it so people running Vista or Windows 7 would not be able to run your control without disabling browser security.


No, it's not possible, since the browser cannot access serial devices connected to the PC (and that's a good thing).

One workaround would be to create a browser plugin which does have the rights to access the serial device, but then, again, you'd have two applications.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号