来自asp.net的串口访问 [英] serial port access from asp.net

查看:95
本文介绍了来自asp.net的串口访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从asp.net页面访问我的网络服务器上的串口。我没有问题从windows窗体应用程序访问串口,没问题,

但代码在asp.net中不起作用。我被告知无法从$ asp访问来自asp.net的串口。


该应用程序用于控制自定义硬件。硬件是通过串口连接到PC的
。我们的客户希望从远程位置控制

硬件,因此我们的想法是在PC上运行IIS

并通过网页控制记录器。

解决方案

我会考虑用Windows服务控制设备的解决方案

和ASP.NET应用程序通过windows服务通过一个常见的

持久性数据存储,例如文件。

Eliyahu


Al the programmer <铝************* @ discussions.microsoft.com>写在

消息新闻:4B ********************************** @ microsof t.com ...

我需要从asp.net页面访问我的网络服务器上的串口。我从windows窗体
应用程序访问串口没有问题,但代码在asp.net中不起作用。我被告知从bb.net访问串口是不可能


该应用程序用于控制自定义硬件。硬件通过串口连接到PC。我们的客户希望从远程位置控制硬件,因此我们的想法是在
PC上运行IIS,并通过网页控制记录器。



没有托管API连接到v1.x中的串行端口。但是在v2.0中有

。如果你现在需要一个解决方案,你必须编写非托管的

代码,然后互操作才能访问它。


-Brock

DevelopMentor
http://staff.develop.com/ballen

我需要从asp.net
页面访问我的网络服务器上的串口。我从windows
表单应用程序访问串口没有问题,但代码在asp.net中不起作用。我被告知无法从asp.net访问串口。

该应用程序用于控制自定义硬件。硬件通过串口连接到PC。我们的客户希望从远程位置控制硬件,因此我们的想法是在PC上运行IIS,并通过网页控制记录器。



这是一个用于访问串口的.net程序集:

http://franson.com/serialtools/index.asp?platform=net

only


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.

解决方案

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.



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


这篇关于来自asp.net的串口访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆