simboss Posted March 21, 2004 Posted March 21, 2004 I need to write a simple web service to run a simple application upon client invocation. I wrote the following code customizing the code provided by the default wizard. [WebMethod] public string StartBatchFile() { try { System.Diagnostics.Process.Start("c:\\wace23b4i.exe"); } catch { return "error"; } return "Success"; } The code compiles and runs, but when I invoke the service, even if I get back the message success, nothing happens!! I hope someone could tell me something soon about this stupid problem. Thx ya all! Quote
Menge Posted March 21, 2004 Posted March 21, 2004 the web service is run as a webservice on the HOST computer. services no not interact with user sessions. so the program IS in fact running... just not on your user. but on the service user. Quote Menge
simboss Posted March 22, 2004 Author Posted March 22, 2004 You are completely right, during the night I arrived at the same conclusion using the task manager to understand what was happening. Anyway my problem is still there, I hope someone can suggest me how to come up with a solution for this problem, or at least give me some indications. Quote
Menge Posted March 22, 2004 Posted March 22, 2004 well the way found the simplest to solve this is to have an app running in user space monitoring a folder and the service saving a file to that folder... so the app in user space would execute the code instead of the server-side one. you could take this a step further by adding some sort of communication between them but i think it's plain overhear :) Quote Menge
Moderators Robby Posted March 22, 2004 Moderators Posted March 22, 2004 You can setup a simple web service to monitor the progress or stutus of the Windows service. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.