473,598 Members | 3,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4810
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.m icrosoft.com> wrote in
message news:4B******** *************** ***********@mic rosoft.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****@NOSPAMd evelop.com> wrote in message
news:36******** **************@ msnews.microsof t.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****@NOSPAMd evelop.com> wrote in message
news:36******** **************@ msnews.microsof t.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 FileSystemWatch er 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.m icrosoft.com> wrote inmessage news:4BE38333-D04D-4F22-8D88- 84**********@mi crosoft.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.m icrosoft.com> wrote in
message news:4C******** *************** ***********@mic rosoft.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****@NOSPAMd evelop.com> wrote in message
news:36******** **************@ msnews.microsof t.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.m icrosoft.com> wrote in
message news:4C******** *************** ***********@mic rosoft.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****@NOSPAMd evelop.com> wrote in message
news:36******** **************@ msnews.microsof t.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.m icrosoft.com> wrote in
message news:77******** *************** ***********@mic rosoft.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.m icrosoft.com> wrote in
message news:4C******** *************** ***********@mic rosoft.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****@NOSPAMd evelop.com> wrote in message
>> news:36******** **************@ msnews.microsof t.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

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

Similar topics

4
9080
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 same port to change the direction of the robot. The trajectory frame is managed by an applet, and the project works good when the applet is called by a html document allocated in the same local machine under W98 where the classes and the serial port...
2
13169
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. However, I'm unsure of how exactly I should be designing the program, I thought I could use threading to start class: class scanner(Thread): def __init__(self,port):
4
11182
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. What I would like to do is make the serial port accessible via a web service. The web service and the legacy application would be running on the same machine. The mobile application would access the web service via a network connection. It...
5
2325
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 problem is when we try to deploy it to another machine we receive: ACCESS IS DENIED TO COM1 PORT. We have tried unsuccessfully to get this to work. We have tried the following: 1) Assign the IUSR.... account to Administrators
38
9636
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 quite a bit over the web and could not find anything useful. I don't want to use Visual C++ or Cygwin, linux, etc. If any of you guys have some little tid bit of code that would be great to look at.
7
5381
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 upon data received via the serial port. If I run the serial port in the main form code, I can get data and, using public properties of the user control, transfer the data to be shown on the graph. However, I am trying to add a feature that will...
5
9483
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 to opening the Serial Port and catching the associated exception? Thanks If there isn't a way to determine the Serial Port within .NET I would be willing, I guess, to use a WinAPI is that was the only way.
4
11706
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 you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "read" on the serial port, depending on which part of the protocol I've got to. Sometimes a return character is expected within half a second,...
2
5422
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 dongle, ive tried a another dongle with widicom software as I was having problems with the IVT bluesoleil software. that seems to have got rid of some other problems,
0
7902
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8395
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8050
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5850
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3898
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2412
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1504
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1250
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.