asp.net 2 page and serial port

G

Guest

Hello,
I am writing an web base application that needs to read data
from a serial port(Postal Scale), I assume i will be using this namespace

System.IO.Ports.SerialPort

I know in vb it would be something like:
(serialport Control, 1200,8,E,1 ...)

Dim Weight As String
SerialPort1.Open()
SerialPort1.Write("W" & Chr(13))
Weight = SerialPort1.ReadLine
MessageBox.Show(Weight)
SerialPort1.Close()

I want to read the info from the local (clients) system that when press
"get weight" button it will call the routine and get this info.

I relize there will be security issuse involved, how to I setup the client
to allow this process.

Generally I need some help understanding and or an example of this in
asp.net 2

Thanks,
Tdar
 
Y

Yunus Emre ALPÖZEN [MVP]

Hi,
It is not possible ! Because it is a WEB APPLICATION not a WINDOWS
APPLICATION. There is an important difference between them. Web Applications
are executed on server, but windows applicaitons are executed on client.. In
the following code, u try to access server's serial port. U have two choice
to do this, one is writing a windows application and the second one is
implementing an ActiveX component. and embedding that activeX component into
your asp.net page....

--
HTH

Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
Microsoft .NET & Security MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top