I don't think my last post came through, so I apologize if this post shows
up twice:
Perhaps its a security issue. Is your web service app running as a Windows
Service? If so, your app will not be able to launch another process that has
any UI (console or graphical) unless your service has the "Allow service to
interact with desktop" flag set.
If that's not it, just for experimentation purposes, try filling out a
ProcessStartInfo struct with the UseShellExecute property set to true.
Regards,
Frank
-----
Hi,
I have a question about the scope of a process, when launched from a web
service (using Process.Start). it may sound silly but there is an unusual
side effect, the process disappears as soon as it starts. i'm building a
very simple web service to control a server dial-up connection, as follows:
[WebMethod]
public void Dial()
{
Process.Start("rasdial.exe", "utv_isdn user pass");
}
this works when i invoke it, but the connection is disconnected straight
away. (if i run it from cmd.exe, it works fine). it's as if the process
gets cleaned up as soon as the web request is finished, is this an IIS thing
to do with processes created by a web request? if it was a variable going
out of scope as soon as the request was done then i could understand this
behaviour, but Process.Start is supposed to start a system process and leave
it until it finishes or the code calls Abort process.
thanks for any help
tim
\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
Tim Mackey - 29 Jul 2004 11:35 GMT
hi Frank,
many thanks for your reply. i had it running as a normal web service, not a
windows service, but now i know about that "interact with desktop" option :)
the UseShellExecute didn't make any difference but it was worth a try.
i actually got it working by changing the appPool for the virtual directory
(running the web service) to a new AppPool i made which runs with the local
system identity.
if anyone is interested in how i got the app working, i put the VS solution
on my blog:
http://tim.mackey.ie/PermaLink.aspx?guid=a5a567a6-4d00-48f1-9b09-2fe2046eeced
thanks
tim
\\ email: tim at mackey dot ie // \\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
> I don't think my last post came through, so I apologize if this post shows
> up twice:
[quoted text clipped - 37 lines]
> \\ blog: http://tim.mackey.ie //
> 67d0ebfec70e8db3