Problem with calling Console application (WCF Service) from webform 
<p>I am using a ASP.net webform application to run an existing console application which get all records from DB and send them through a third party WCF service. Locally everything is working fine. When I run the application it opens the console, gets the records and sends them. But now I pushed my files over to Test server along with the exe file and related config files. But when I access the application through the browser (test url) I get the same error message time and again and I don't see the console window. Sometimes everything works fine  but never two times in a row. </p>

<p>The error message is:</p>

<pre><code>"There was no end point listening at '.....svc' that could accept message. This is often caused by incorrect address or soap action. 

System.net.webexception. Remote name could not be resolved 
at System.Net.HttpWebRequest.GetRequestStream 
at System.ServiceModel.Channels.HttpOutput.Webrequest.HttpOutput.GetOutputStream()
</code></pre>

<p>The code I have used in the webform to call console application is:</p>

<pre><code>ProcessStartInfo p = new ProcessStartInfo();
p.Arguments = _updateNow.ToString();
p.FileName="something";
p.UseShellExecute = false;// tried true too without luck
Process.Start(p);
</code></pre>

<p>Error message denotes "there is no end point" and sounds like there is problem with the WCF service but if I double click the executable in Test there is no problem. What could be the possible problem or should I redo the console application functionality to my main webform application? </p>

<p>Update: After adding Thread.Sleep(3000) after Process.Start(p), I'm having no problem. So seems like main application is not waiting for the batch process to complete. How to solve this problem? </p>
