0

I am running a .bat file from ASP.NET by creating a process named proc.Also I am using IIS as a server.

Now I want to redirect the output from command prompt to the webpage, for this I had used BeginOutputReadLine() but with that I am able to display the redirected output only after my process got exited.

But I want to redirect line by line and need to display it immediately. How can I achieve this?

rajasekar25
  • 309
  • 1
  • 3
  • 19
  • Take a look at [this question](http://stackoverflow.com/questions/9533070/how-to-read-to-end-process-output-asynchronously-in-c). You may be able to do something similar and pipe it to the `Response` followed by flushing it – James Thorpe Nov 20 '14 at 12:26
  • In that question which answer you are asking me to try – rajasekar25 Nov 20 '14 at 12:32
  • It was more the question itself, and the use of [the event](http://msdn.microsoft.com/en-us/library/system.diagnostics.process.outputdatareceived(v=vs.110).aspx) to handle new output data – James Thorpe Nov 20 '14 at 12:33

0 Answers0