views:

23

answers:

2

Hi I've got an app that runs a long running process on the command line.

Is there a recommended or good way to stream the output messages asynchonously to a web form so there's some indication of progress? A bit like TeamCity does for build scripts.

Should I be polling a webservice? Using the OutputDataReceived event? Turning off buffering?

A: 

I feel its better using a service which can be remoted. The commandline app's output should go to the remoted service, and should be available in its memory. The webservice should call a remoted method which can read this output (stored in the remoting service's memory).

deostroll
+1  A: 

I think it depends on what you need the UI to look like. If it's just a utility-type thing, I'd just turn off response buffering.

However, if you need it to look pretty, use AJAX to poll a web service.

dave thieben