473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

serial port access from asp.net

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.
Nov 19 '05 #1
13 4786
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" <Al*************@discussions.microsoft.com> wrote in
message news:4B**********************************@microsof t.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.

Nov 19 '05 #2
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.


Nov 19 '05 #3
Here is a .net assembly for accessing the serial port:

http://franson.com/serialtools/index.asp?platform=net
only $30 bucks

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:36**********************@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
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.


Nov 19 '05 #4
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" <ba****@NOSPAMdevelop.com> wrote in message
news:36**********************@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
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.



Nov 19 '05 #5
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 deviceand an ASP.NET application talking to the windows service via a commonpersistent data storage, such as a file.

Eliyahu

"Al the programmer" <Al*************@discussions.microsoft.com> wrote inmessage news:4BE38333-D04D-4F22-8D88- 84**********@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 formapplication,
but the code doesn't work in asp.net. I have been told
it is not possibleto
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 thePC
and the recorder controlled through a web page.

.

Nov 19 '05 #6
> 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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:4C**********************************@microsof t.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:
Here is a .net assembly for accessing the serial port:

http://franson.com/serialtools/index.asp?platform=net
only $30 bucks

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:36**********************@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
>
>
>
>> 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.
>>
>
>
>


Nov 19 '05 #7
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:
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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:4C**********************************@microsof t.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:
Here is a .net assembly for accessing the serial port:

http://franson.com/serialtools/index.asp?platform=net
only $30 bucks

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:36**********************@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
>
>
>
>> 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.
>>
>
>
>


Nov 19 '05 #8
>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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:77**********************************@microsof t.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:
> 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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:4C**********************************@microsof t.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:
>
>> Here is a .net assembly for accessing the serial port:
>>
>> http://franson.com/serialtools/index.asp?platform=net
>> only $30 bucks
>>
>> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
>> news:36**********************@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
>> >
>> >
>> >
>> >> 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.
>> >>
>> >
>> >
>> >
>>
>>
>>


Nov 19 '05 #9
> 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
Nov 19 '05 #10
The problem is not permissions. ASPNET and IUSR have administrator
priviledges on the computer. The Windows API calls for serial ports don't
work under ASP.net.
"Kevin Spencer" wrote:
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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:77**********************************@microsof t.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:
> 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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:4C**********************************@microsof t.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:
>
>> Here is a .net assembly for accessing the serial port:
>>
>> http://franson.com/serialtools/index.asp?platform=net
>> only $30 bucks
>>
>> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
>> news:36**********************@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
>> >
>> >
>> >
>> >> 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.
>> >>
>> >
>> >
>> >
>>
>>
>>


Nov 19 '05 #11
> The problem is not permissions. ASPNET and IUSR have administrator
priviledges on the computer. The Windows API calls for serial ports don't
work under ASP.net.
Well, darn. I suppose my apps only LOOK like they work...

Then again, I didn't copy them from anything.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:B8**********************************@microsof t.com... The problem is not permissions. ASPNET and IUSR have administrator
priviledges on the computer. The Windows API calls for serial ports don't
work under ASP.net.
"Kevin Spencer" wrote:
>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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:77**********************************@microsof t.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:
>
>> > 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 Seek Is What You Get.
>>
>> "Al the programmer" <Al*************@discussions.microsoft.com> wrote
>> in
>> message news:4C**********************************@microsof t.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:
>> >
>> >> Here is a .net assembly for accessing the serial port:
>> >>
>> >> http://franson.com/serialtools/index.asp?platform=net
>> >> only $30 bucks
>> >>
>> >> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
>> >> news:36**********************@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
>> >> >
>> >> >
>> >> >
>> >> >> 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.
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #12
Since you are unable to supply any useful information I can only assume you
don't know anything. Judging by your attitude you are probably a teenager.
"Kevin Spencer" wrote:
The problem is not permissions. ASPNET and IUSR have administrator
priviledges on the computer. The Windows API calls for serial ports don't
work under ASP.net.


Well, darn. I suppose my apps only LOOK like they work...

Then again, I didn't copy them from anything.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:B8**********************************@microsof t.com...
The problem is not permissions. ASPNET and IUSR have administrator
priviledges on the computer. The Windows API calls for serial ports don't
work under ASP.net.
"Kevin Spencer" wrote:
>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 Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:77**********************************@microsof t.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:
>
>> > 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 Seek Is What You Get.
>>
>> "Al the programmer" <Al*************@discussions.microsoft.com> wrote
>> in
>> message news:4C**********************************@microsof t.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:
>> >
>> >> Here is a .net assembly for accessing the serial port:
>> >>
>> >> http://franson.com/serialtools/index.asp?platform=net
>> >> only $30 bucks
>> >>
>> >> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
>> >> news:36**********************@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
>> >> >
>> >> >
>> >> >
>> >> >> 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.
>> >> >>
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #13
> Since you are unable to supply any useful information I can only assume
you
don't know anything. Judging by your attitude you are probably a
teenager.
Well, you're wrong on point 2 - I am 49 years old. Could it be that you're
wrong about anything else? Well, logically, one could make that prediction.

If by "unable to supply any useful information" you mean I can't write your
code for you, your assumption is patently incorrect. I am perfectly capable
of writing code, yours or anyone else's. However, we seem to have a
disagreement about how "useful" my advice is.

If your child asked you for a piece of cake just before dinner, would you be
helping him/her by giving it to him/her? Similarly, I try to help people by
telling them what they need to know, not necessarily what they think they
want to know. Yeah, I know, it doesn't taste like cake. But it's good for
you!

Let me illustrate by quoting you:
>> >> > 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.

This statement is full of assumptions, almost all of them wrong. It
indicates that you can't seem to write code for yourself, that you copied
code from an example without studying and understanding it, and that you
assume the fault is with the platform. Getting a feed from a serial port is
an academic exercise. Knowing how to program, understanding logic, and best
practices are indispensible. If I wrote code for you that accesses a serial
port, you would have a small problem solved, but the cause ignored. If, on
the other hand, you learn how to really program, not just put pieces
together like a Jigsaw puzzle, and you disciplined your logic, and learned
and practiced best practices, the first problem would be solved, and any
future problems of that nature would disappear.

So, if I'm guilty of being "useless," perhaps it's your idea of "useless"
that is at fault.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:A6**********************************@microsof t.com... Since you are unable to supply any useful information I can only assume
you
don't know anything. Judging by your attitude you are probably a
teenager.
"Kevin Spencer" wrote:
> The problem is not permissions. ASPNET and IUSR have administrator
> priviledges on the computer. The Windows API calls for serial ports
> don't
> work under ASP.net.


Well, darn. I suppose my apps only LOOK like they work...

Then again, I didn't copy them from anything.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Al the programmer" <Al*************@discussions.microsoft.com> wrote in
message news:B8**********************************@microsof t.com...
> The problem is not permissions. ASPNET and IUSR have administrator
> priviledges on the computer. The Windows API calls for serial ports
> don't
> work under ASP.net.
>
>
> "Kevin Spencer" wrote:
>
>> >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 Seek Is What You Get.
>>
>> "Al the programmer" <Al*************@discussions.microsoft.com> wrote
>> in
>> message news:77**********************************@microsof t.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:
>> >
>> >> > 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 Seek Is What You Get.
>> >>
>> >> "Al the programmer" <Al*************@discussions.microsoft.com>
>> >> wrote
>> >> in
>> >> message news:4C**********************************@microsof t.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:
>> >> >
>> >> >> Here is a .net assembly for accessing the serial port:
>> >> >>
>> >> >> http://franson.com/serialtools/index.asp?platform=net
>> >> >> only $30 bucks
>> >> >>
>> >> >> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
>> >> >> news:36**********************@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
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >> 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.
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>


Nov 19 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
2
by: willie | last post by:
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. ...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
5
by: Franklin M. Gauer III | last post by:
Hi All, I've written an ASP.NET application (webservice) that does simple serial communications via the .NET 2.0 SerialComm object. The application runs fine on my development machine. The...
38
by: shussai2 | last post by:
Hi, I am trying to access Serial Port in XP. I am using Dev-C++ IDE that uses Mingw as a compiler. I just want to know how I can open up serial port on COM1 and write some data. I have searched...
7
by: davetelling | last post by:
I'm a newbie that is still struggling with OOP concepts & how to make things work they way I want. Using Visual C# Express, I have a form in which I added a user control to display a graph, based...
5
by: LongBow | last post by:
Hello, Is there a way, in .NET, to determine what are the avialable Serial (Communications) Ports on a Windows OS and is there a way to determine that port isn't being use other than attempting...
4
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when...
2
by: colin | last post by:
Hi, Im having a tiresome amount of trouble with using a bluetooth serial link. The receiving end is a bluetooth-rs232 module conected to my embeded system. The PC has a little usb bluetooth...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.