×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

passing data from an asp page to another application?

passing data from an asp page to another application?

passing data from an asp page to another application?

(OP)
What I want to do is read and write to the parallel port
from a asp or aspx web page. I have written the program that can read and write to the parallel port, but need some way to get data from asp/aspx page to this application.

I have it working now by writing a file to the server then reading that file with my app. I'm looking for a more effcient way.

Is there a way to get application variables from an asp page to an exe.?

I've tried this from another web site
        WshShell = CreateObject("WScript.Shell")
        WshShell.Run("C:\ConsoleApplication1 "& sendValue)
        WshShell = Nothing
But get access denied errors?

Whats the best way to do this?
I'm not a programmer so dumb it down the best you can :)
I'm using XP pro, vb.net Std and IIS

RE: passing data from an asp page to another application?

Access denied is to do with your IE settings.
See if this works - create 2 files hello.vbs and hello.htm
hello.vbs

CODE

WScript.echo "hello"
hello.htm

CODE

<html>
<body>
    <script language="vbscript">
        set objShell=CreateObject("Wscript.shell")
        objShell.Run "wscript F:\scr\60009\hello.vbs",1,false
    </script>
</body>
</html>
run hello.htm from IE.  If that works, then the problem is in what you put after the word Run.

RE: passing data from an asp page to another application?

Sorry - hello.htm should look like

CODE

<html>
<body>
    <script language="vbscript">
        set objShell=CreateObject("Wscript.shell")
        objShell.Run "wscript hello.vbs",1,false
    </script>
</body>
</html>
If that doesn't work then put down the full path name of hello.vbs

RE: passing data from an asp page to another application?

(OP)
That will only run the exe. on the client side right?
I need a way to run it on the server. I found Aspexec.dll
that looks promising , but haven't got it working yet.

RE: passing data from an asp page to another application?

Don't quite understand this - you are on a PC connected to an ASP server.  You want to invoke a web page on a server that will get data from somewhere and return it to the server.  The server in turn will write this data out to the parallel port.  In that case you'll have to use something like this.  You will have to give your page an asp extension

CODE

<html>
<body>
<%
   set objShell=CreateObject("Wscript.shell")
   objShell.Run "your.exe "&request("data"),1,false
%>
Done
</body>
</html>
There should be a separate page posting the data to this page.

RE: passing data from an asp page to another application?

(OP)
That works. I actually tried that at first but could not get it to work. To make Aspexec.dll work I had to make changes to 4 or 5 services to allow them to interact with the desktop. Those changes maybe the reason it works now.
Thank you for your help.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

White Paper - Smart Manufacturing for Semiconductor
New technologies and approaches present great opportunities for semiconductor manufacturers to achieve high levels of innovation, yield and improvement. This white paper explores some of these cutting-edge technologies and how they can be applied effectively in the semiconductor industry. Read about how Smart Manufacturing is transforming the semiconductor industry. Download Now
White Paper - Analysis and Simulation in Aircraft Structure Certification
Organizations using simulation and analysis tools effectively see the benefits in their ability to achieve certification faster and with drastically less total cost than those who do not maximize these tools. Read this White Paper to learn about how digital tools such as analysis and simulation help in aircraft structure certification. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close