472,353 Members | 1,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

asp.net new process hangs

I am trying to write an asp.net web page that will spawn a
third party .exe file and return the results back to my
asp page. I am able to write a vb.net program that will
do this just fine. I redirect the output to a msgbox and
display it on the screen. However, when I put this as an
asp.net web page, the process just hangs. I am able to do
other processes from the same web page and get the
results, but when I try to launch this one it just hangs.
I was able to launch it as a seperate thread, then find
the thread and kill it, but then I don't get the program
results re-directed to std-out to display on a web page.
Can anyone help?

Here is a copy of the code that is being launched:

Sub startprocess()

Dim p As New Process

' Set up process to execute direct so that the
output can be captured
With p.StartInfo
.CreateNoWindow() = False
.UseShellExecute = False
.FileName = "c:\plink.exe"
.Arguments = " -ssh -l myun -pw mypw
un@server ./myvnc start"
.RedirectStandardOutput = True
.RedirectStandardError = True
End With

' Execute the process
p.EnableRaisingEvents() = True
If p.Start() Then
p.WaitForExit(5)
mvarResults = p.StandardOutput.ReadToEnd()
End If
End Sub
Nov 17 '05 #1
1 1600
Scott,

You might be confused about state management with a web app. Web
applications are stateless. This means that the server creates a page
object, then sends the html output that the page object creates to the
client machine. The page object is then destroyed.

What this means is that if you execute a thread the thread is actually
executing on the web server and will it's actions such as a message box will
never show up in the browser. It's a different environment all together.

I hope this helps.

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Scott" <sp*********@yahoo.com> wrote in message
news:0d****************************@phx.gbl...
I am trying to write an asp.net web page that will spawn a
third party .exe file and return the results back to my
asp page. I am able to write a vb.net program that will
do this just fine. I redirect the output to a msgbox and
display it on the screen. However, when I put this as an
asp.net web page, the process just hangs. I am able to do
other processes from the same web page and get the
results, but when I try to launch this one it just hangs.
I was able to launch it as a seperate thread, then find
the thread and kill it, but then I don't get the program
results re-directed to std-out to display on a web page.
Can anyone help?

Here is a copy of the code that is being launched:

Sub startprocess()

Dim p As New Process

' Set up process to execute direct so that the
output can be captured
With p.StartInfo
.CreateNoWindow() = False
.UseShellExecute = False
.FileName = "c:\plink.exe"
.Arguments = " -ssh -l myun -pw mypw
un@server ./myvnc start"
.RedirectStandardOutput = True
.RedirectStandardError = True
End With

' Execute the process
p.EnableRaisingEvents() = True
If p.Start() Then
p.WaitForExit(5)
mvarResults = p.StandardOutput.ReadToEnd()
End If
End Sub

Nov 17 '05 #2

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

Similar topics

12
by: JD | last post by:
This is another Python problem, I think might be unrelated to the earlier bug I found, and eventually figured out how to report it to...
3
by: JTF | last post by:
Whenever I start an application from ASP.NET, the exe hangs, with Task manager showing no cpu time. Every exe I've tried hangs in the same way...
5
by: Scott | last post by:
So I can't figure out how to Google for this problem, I'll try asking for a solution here. Whenever I deploy changes, whether they are changed...
6
by: Alexander Widera | last post by:
hello, if i start a program (an exe-file) with Process.Start(...) I don't have the required permissions that the programm needs (i could start...
4
by: Podi | last post by:
Hi, I am using Python 2.4.4 on Windows XP SP2. I am trying to start a process (infinite loop application) in the background and I've tried...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load...
2
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using...
5
by: Saya | last post by:
Hi Folks, I have now spend app. 3 days to get the below scenario to work, but can not get there! ..Net version = 2.0.50727 Windows version =...
0
by: eso40043 | last post by:
Hello, due to a memory leak (bug, I guess) in pyraf(or rather in IRAF) I have to fork an iterative process that goes through hundreds of image...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

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.