<p>I'm working on an integration testing project in .NET. The testing framework executable starts a service and then needs to wait for the service to complete an operation.</p>

<p>What is the best approach for the exe to wait on the service to complete its task (the service itself will not exit upon task completion)?</p>

<p>Both processes have access to the same database, so my first thought was a simple table that records the service's status. Once it's signaled that it's done, the exe can stop waiting and complete its task. Other approaches?</p>

<p>Let me reiterate that the service, once it has completed its task, will remain in a running/in-memory state, so waiting for it to exit won't work. ;-)</p>

<p>Also, this is purely for integration testing purposes, and will never go into production, so "simple" is the operative word.</p>

You could use IPC Channels:
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6143016.html
Or maybe two way remoting:
http://www.codeproject.com/KB/IP/TwoWayRemoting.aspx
The database route would be
simple
, but not necessarily the best.