Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!

Posted
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.
Menge
Posted
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.
Posted
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 :)
Menge

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...