controlling parallel port using asp.net

K

Thread Starter

khanna

hi there

does anyone know how to communicate with parallel port using asp.net? i tried looking for the code i can't find. plz email me if u know how to go about it. 10 q.
 
Do you want to communicate between Server serial port and asp.net OR between any client serial port and asp.net? First case is much easier.

I assume you're in the first case.

There is a Quick-and-dirty way : use a COM control like in Visual Basic 6 (MSCOMM32.CTX) and call its methods from your ASP.net code. You can find information on its object there : http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20852668.html

The other way would involve finding the rights objects in the .net collections.

Note : in any case, you should configure your web server to run your code with an user having enough privileges to access to com port (by default the IUSR user won't be able to)

Give me more details and I'll be more specific.

Hope it helps,
Pascal
 
J

Johan Bengtsson

What are you trying to do? Use the parallel port as a digital I/O port? - Well it is possible but there is a quite long way between a language like asp.net and a physical I/O port in modern operating systems.

If you run it in NT, W2k, or XP you definitely need a low level device driver capable of changing/reading the voltage levels of the parallel port pins - and you need a DLL capable of calling this with an interface suitable for asp.net. (The machine language instructions IN and OUT are reserved for device drivers and can not be invoked in any other code without that program crashing)

If you run any of the win 9x (including ME) you could perhaps get away with only the DLL - if you turn off the printer port driver

There might be existing drivers out there somewhere - I don't know any suitable (I could write one if I like - but it is quite some work to get even a simple driver like that up and running if you don't do it on a regular basis - the one I previously have written can probably not be easily interfaced from asp.net and is non-trivial to install).

/Johan Bengtsson

Do you need education in the area of automation?
----------------------------------------
P&L, Innovation in training
Box 252, S-281 23 Hässleholm SWEDEN
Tel: +46 451 74 44 00, Fax: +46 451 898 33
E-mail: [email protected]
Internet: http://www.pol.se/
----------------------------------------
 
Top