Read data from com port since client, web application, C#, .NET, Razor, MVC4

1.2k views Asked by At

Good day, I created a web application using razor, mvc4 and c #, what happens is that I need to read some data traveling through a COM port on the computer, on the server it runs smoothly, the disadvantage is that I need to read the data through com but from every PC you open the application, not necessarily from Server, is it this possible ?, thank you very much.

2

There are 2 answers

0
Icemanind On

Web browsers do not allow serial port access. And this makes sense because if a malicious web site could just read and transmit data through a client serial port, it'd be a serious security issue. There are only 2 ways to do this:

  1. Using a rich internet technology, such as Silverlight or Flash. Both are being deprecated though.

  2. Google Chrome has an API that you can access from Javascript. However, this solution will ONLY work on Chrome browsers.

0
Scottie On

You would have to write a browser plugin that allows access to the serial port, then each user would have to accept and install this plug in.