By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,755 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

Windows service won't start

P: n/a
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?
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <ch**********@sbcglobal-NO-SPAM.net> wrote in message
news:eb**************@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?

Nov 17 '05 #2

P: n/a
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.

"Dan Bass" <Not Listed> wrote in message
news:e8**************@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" <ch**********@sbcglobal-NO-SPAM.net> wrote in message
news:eb**************@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?


Nov 17 '05 #3

P: n/a
What happens if you change the user account under which the service runs?

Set it to Administrator for example, then try a user with less priviledges
if that works until you find a point where it stops.

I've known systems where the local service user doesn't have access to write
to the event log.

"Chuck Bowling" <ch**********@sbcglobal-NO-SPAM.net> wrote in message
news:e4**************@TK2MSFTNGP09.phx.gbl...
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.

"Dan Bass" <Not Listed> wrote in message
news:e8**************@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" <ch**********@sbcglobal-NO-SPAM.net> wrote in message
news:eb**************@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?



Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.