473,382 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 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 1661
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 Sourceforge. This is related to a question I have about...
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 (notepad, cmd, ms access). What runs is a .net exe...
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 code-behind DLL's or ASPX/ASCX/ASAX pages to my...
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 the programm but the program needs special rights)....
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 several options and none of them seem to work. ...
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 event I Fill the datagridview source table with a...
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 Process.StandardOutput to get the output of the...
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 = Microsoft Windows = Windows Server 2003 Now I...
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 frames and does unspeakable things to them. In the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.