RS 232 Communication in ASP.NET 3.5?
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.
- You are calling native code so you need full trust.
- You cannot monitor the device(C) for replies
精彩评论