Help with c# and web services

simboss

Newcomer
Joined
Mar 21, 2004
Messages
2
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!
 
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.
 
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.
 
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 :)
 
Back
Top