views:

107

answers:

1

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 http://www.activexperts.com/activcomport/howto/aspnetc/ ?

A: 

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
renick