Re: Spawning console EXE from Windows Service

From: Lee Gillie (ANTISPAMIFICATION_lee_at_odp.com)
Date: 03/25/04


Date: Thu, 25 Mar 2004 08:25:50 -0800

I resolved this myself. I found that the path used by the service to invoke the EXE in the subprocess contained a SHARE. The
software runs out of a different security zone, as such. The EXE was really found on a local disk anyway, so I merely changed the
filespec, and it works now. This system is highly distributed within our LAN, and so we tend to save all filespecs with UNCs.

I think the basic question is still of value though: How do you diagnose these kinds of errors? I just got stoooopid lucky and
found this problem, but I am worried about the next one.

- Lee

"Lee Gillie" <ANTISPAMIFICATION_lee@odp.com> wrote in message news:uP2$38nEEHA.2460@TK2MSFTNGP10.phx.gbl...
> Of course the VB.NET console EXE runs fine in the IDE. Non .NET EXE run fine spawned by the service. But my VB.NET console EXE
> won't run under the service. Service starts under a domain logon, which is an administrator. Messages I get don't tell (me)
much...
>
> 07:26:52 Unhandled Exception: System.Security.SecurityException: Security error.
> 07:26:52 at test.Main()
> 07:26:52 The granted set of the failing assembly was: (long list)
>
> This offers to DEBUG, but it seems to be in EXE startup, before it gets to my first line of code. None of my app console output is
> seen. My first Try-Catch in MAIN is never reached.
>
> I would like to know more about the error. How can I diagnose this?
>
>



Relevant Pages