Bacically I have command prompt application and I would like run the results on the server within the a specific console and return the results to the asp.net page. I would rather not spawn a new console. What is the best way to do this?
Thanks
-
-
Take the logic out of the console app and put it in a library.
-
Thanks for your reply
I can't do that for this particular console app. -
You use the Process class. Pass a ProcessStartInfo to the Start method with RedirectStandardOutput set to true, then use the Process.StandardOutput property to read out the output from the application.
-
What is it that you are trying to do?
Calling a console app using the Process class in ASP.NET isn't going to scale too well...
Chris
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.