Running program from diagnostics.process never completes.

J

joeted

Hi,

I am using system.diagnostic.process with the intention of running a
program to communicate with a unix box:

The program is "PuTTY", running from a batch script. I know it works
because if i manually trigger the batch, the results can be seen on the
unix side.

Running the batch script from an .aspx page however makes the process
hang indefinately, and the program does not successfully complete. I
know that the batch can be successfully called (by doing simple 'echo >
txt' type things), and also that any debug msgs BEFORE triggering the
program gets written to the text file, but not any debug msgs after.

I have tried using process.WaitForExit(5000) to specify a timeout, which
breaks the hanging process, but the program still does not run.

I have also tried controlling the StdIn and StdOut, setting
useShellExecute to "False", similar to this URL:
http://www.devx.com/dotnet/Article/7914/0/page/5
The hanging problem still occurs.

NB: I do not know if this problem is true for a process such as
'notepad' that would not need communication to another machine.
I am not administrator of the .net box, and I deal with it remotely, so
I cannot try to monitor a program local to the .net machine such as
notepad. (if any one can suggest a 'native' program i could trigger that
would somehow give me feedback, like creating a text file etc. then it
might help to isolate the issue further.)

Thanks so much for reading through all this!!!
Any help or suggestions on what causes the hanging would be wonderful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top