S
Scott
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
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