Well, the particular service that I posted I didn't run as a console app.
But, before doing the walkthru I did another windows service with exactly
the same problem. I developed it just the way you suggested below. Created a
console app and used it to debug all the code. Then I transferred the code
to a service and installed it. The result was the same as below...
The code in the walkthru is pretty simple. Basically all it does is write to
an EventLog in both the OnStart and OnStop methods.
[quoted text, click to view] "Dan Bass" <Not Listed> wrote in message
news:e8Nfw3gfFHA.3460@TK2MSFTNGP10.phx.gbl...
> When writing services what I normally do is write the core code in a
> separate assembly (DLL), then have two front ends, one being a windows
> service, and another a simple dialog or better, a console. This allows me
> to check that the code works fine and that it's not a windows service
> problem.
>
> Basically the point I'm getting at is, are you sure it's something to do
> with the windows service layer of the application, or could it be
> permissions in the core code?
>
>
>
> "Chuck Bowling" <chuckbowling@sbcglobal-NO-SPAM.net> wrote in message
> news:eb4R50efFHA.3940@tk2msftngp13.phx.gbl...
>> Ok, I'm not sure this is a C# question but here goes anyhow...
>>
>> I used this walkthru to create a windows service:
>>
>> ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcon/html/vbwlkwalkthroughcreatingwindowsserviceapplication.htm
>>
>> It appears to install ok but when I try to start it I get this message in
>> a JIT Debugging window:
>>
>> "JIT Debugging failed with the following error: Access is denied.
>> JIT Debugging was initiated by the user account: 'NT AUTHORITY\LOCAL
>> SERVICE'."
>>
>> When I check the docs for JIT debugging errors it tells me to check that
>> I'm in the Debuggers Group which I am.
>>
>> Anybody got a clue as to what's wrong and how I can fix it?
>>
>>
>
>