have no problem accessing the serial ports from a windows form application,
but the code doesn't work in asp.net. I have been told it is not possible t
o
access the serial ports from asp.net.
The application is used to control custom hardware. The hardware is
connected to a PC through serial ports. Our customer wants to control the
hardware from a remote location so our idea was to have IIS running on the P
C
and the recorder controlled through a web page.I would consider a solution with a windows service controlling the device
and an ASP.NET application talking to the windows service via a common
persistent data storage, such as a file.
Eliyahu
"Al the programmer" <Altheprogrammer@.discussions.microsoft.com> wrote in
message news:4BE38333-D04D-4F22-8D88-848840906461@.microsoft.com...
> I need to access the serial ports on my webserver from an asp.net page. I
> have no problem accessing the serial ports from a windows form
application,
> but the code doesn't work in asp.net. I have been told it is not possible
to
> access the serial ports from asp.net.
> The application is used to control custom hardware. The hardware is
> connected to a PC through serial ports. Our customer wants to control the
> hardware from a remote location so our idea was to have IIS running on the
PC
> and the recorder controlled through a web page.
There are no managed APIs to connect to the serial port in v1.x. There are
in v2.0 though. If you need a solution now, you'll have to write unmanaged
code and then interop to access it.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> I need to access the serial ports on my webserver from an asp.net
> page. I have no problem accessing the serial ports from a windows
> form application, but the code doesn't work in asp.net. I have been
> told it is not possible to access the serial ports from asp.net.
> The application is used to control custom hardware. The hardware is
> connected to a PC through serial ports. Our customer wants to control
> the hardware from a remote location so our idea was to have IIS
> running on the PC and the recorder controlled through a web page.
>
Here is a .net assembly for accessing the serial port:
http://franson.com/serialtools/index.asp?platform=net
only $30 bucks
"Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
news:360668632482173457288576@.msnews.microsoft.com...
> There are no managed APIs to connect to the serial port in v1.x. There are
> in v2.0 though. If you need a solution now, you'll have to write unmanaged
> code and then interop to access it.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>
Accessing the serial ports in .net is not the problem. Accessing the serial
ports in asp.net is the problem. Code that accesses the serial ports in a
Windows form application does not work in a asp.net application.
"Shawn H. Mesiatowsky" wrote:
> Here is a .net assembly for accessing the serial port:
> http://franson.com/serialtools/index.asp?platform=net
> only $30 bucks
> "Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
> news:360668632482173457288576@.msnews.microsoft.com...
>
>
It's a good idea. To build a middle layer data file and
use FileSystemWatcher object to monitor the data file and
trigger event.
Elton
>--Original Message--
>I would consider a solution with a windows service
controlling the device
>and an ASP.NET application talking to the windows service
via a common
>persistent data storage, such as a file.
>Eliyahu
>"Al the programmer"
<Altheprogrammer@.discussions.microsoft.com> wrote in
>message news:4BE38333-D04D-4F22-8D88-
848840906461@.microsoft.com...
an asp.net page. I
windows form
>application,
it is not possible
>to
The hardware is
wants to control the
IIS running on the
>PC
>
>.
>
> Accessing the serial ports in .net is not the problem. Accessing the
> serial
> ports in asp.net is the problem. Code that accesses the serial ports in a
> Windows form application does not work in a asp.net application.
An ASP.Net application is a .Net application, just as a Windows Form
application is a .Net application. There is nothing you can do in a Windows
Form app that you can't do in an ASP.Net app, except with regards to the UI.
IOW, yes you can access a serial port in an ASP.Net app. Or, let me clarify:
yes -I- can access a serial port in an ASP.Net app.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S

"Al the programmer" <Altheprogrammer@.discussions.microsoft.com> wrote in
message news:4C910B4E-F34D-40CD-8930-D1CB45DD0DDA@.microsoft.com...
> Accessing the serial ports in .net is not the problem. Accessing the
> serial
> ports in asp.net is the problem. Code that accesses the serial ports in a
> Windows form application does not work in a asp.net application.
>
> "Shawn H. Mesiatowsky" wrote:
>
I use the serial port code that was published in MSDN magazine. It works fo
r
Windows Forms applications. It does not work in ASP.net. I have been told
by many people you cannot access serial ports from ASP.net. Telling me you
can access the serial ports doesn't do me any good.
"Kevin Spencer" wrote:
> An ASP.Net application is a .Net application, just as a Windows Form
> application is a .Net application. There is nothing you can do in a Window
s
> Form app that you can't do in an ASP.Net app, except with regards to the U
I.
> IOW, yes you can access a serial port in an ASP.Net app. Or, let me clarif
y:
> yes -I- can access a serial port in an ASP.Net app.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> What You S

> "Al the programmer" <Altheprogrammer@.discussions.microsoft.com> wrote in
> message news:4C910B4E-F34D-40CD-8930-D1CB45DD0DDA@.microsoft.com...
>
>
>I use the serial port code that was published in MSDN magazine. It works
>for
> Windows Forms applications. It does not work in ASP.net. I have been
> told
> by many people you cannot access serial ports from ASP.net. Telling me
> you
> can access the serial ports doesn't do me any good.
Copying and pasting is not programming. And IT doesn't do you any good.
Hmmmm... Why would code that is written for, and works for a Windows Forms
app not work in an ASP.Net app? Well, I haven't seen it, so I'll have to ask
The Amazing Kreskin.... he says it's permissions.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S

"Al the programmer" <Altheprogrammer@.discussions.microsoft.com> wrote in
message news:77A8DB7E-1E7A-4E3C-80E7-9AB6A05425CB@.microsoft.com...
>I use the serial port code that was published in MSDN magazine. It works
>for
> Windows Forms applications. It does not work in ASP.net. I have been
> told
> by many people you cannot access serial ports from ASP.net. Telling me
> you
> can access the serial ports doesn't do me any good.
>
> "Kevin Spencer" wrote:
>
> An ASP.Net application is a .Net application, just as a Windows Form
> application is a .Net application. There is nothing you can do in a
Windows
> Form app that you can't do in an ASP.Net app, except with regards to the
UI.
Some tasks are definitely not good for ASP.NET. For example, multithreading.
And recently someone asked about watching a directory from an ASP.NET
application. Although you can use a filewatcher during the page lifetime, it
obviously doesn't serve any purpose .
Eliyahu
0 comments:
Post a Comment