开发者

RS 232 Communication in ASP.NET 3.5?

开发者 https://www.devze.com 2023-01-03 00:50 出处:网络
using ASP.NET 3.5 WebForm using C# 3.0, is it possible to setup a RS 232 communication with a device? I need the WebForm to be able to read and write data to the serial port. I would appreciate if the

using ASP.NET 3.5 WebForm using C# 3.0, is it possible to setup a RS 232 communication with a device? I need the WebForm to be able to read and write data to the serial port. I would appreciate if there are some good examples, thanks.

I understand that under Components, there is a SerialPort .NET Component, but it seems to me that it can only be used in a Windows application (WinForm).

Or the only solution is to rely on the ActiveComport Serial Port Toolkit, as from ht开发者_JAVA百科tp://www.activexperts.com/activcomport/howto/aspnetc/ ?


I assume your situation is

(A.web client) <--http--> (B.iis/asp.net) --serial link--> (C.some device)

The good news is there are solutions without controls. See this MSDN Magazine article or this Codeguru Article

Two issues.

  1. You are calling native code so you need full trust.
  2. You cannot monitor the device(C) for replies
0

精彩评论

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