Dear Friends,
Need your help. I have a scenario where I need to call a webservice hosted on a database server in DMZ, from a client console application.The webservice should start a batch file, locally on database server, which calls some package and when the processing of that package is finished batch file should inform Console Client application about it. For my testing purpose I have written the below code
string target = @"c:\Test Batch.bat";
Process proc = new Process();
proc.StartInfo.FileName = target;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.Exited += new EventHandler(proc_Exited);
proc.EnableRaisingEvents = true;
proc.Start();
proc.WaitForExit();
I also created a webservice locally and i am able to start the batch file via webservice call. Since I need to report back to client that batch file is finished, I used Asyn method, and registered for the onCompleted event of the webservice. But here is my problem, the OnCompleted event is not fired :(
What should i do to get it working ?
Also if my batch file is runnig some other EXE which takes about 2 hours to finish, the process class wait for 2 hours till the time EXE is finished or it exits when the batch file has started the EXE, and dont wait for it to finish ?
One other question, which authentication mode should be used to secure web service as the database server is on DMZ ?
Many thanks if all my questions are answered. Regards!
"Confidence does not come when you all the answers, It comes when you are ready to face all the questions"