By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,212 Members | 2,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,212 IT Pros & Developers. It's quick & easy.

Running program from diagnostics.process never completes.

P: n/a
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.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.