Need better crash info for failing service

P

Per Bergland

I have a system service written in C#.
For some reason it fails to start on our external web server (running a
tightened Windows 2000).
If I try to start the services after logging on, it works great.

The Application event log says in a ".NET Runtime" entry:

"The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. The following information is part of the event: .NET Runtime
version 1.1.4322.573- myserverservice.exe - Common Language Runtime
Debugging Services: Application has generated an exception that could
not be handled.

Process id=0x238 (568), Thread id=0x23c (572).

Click OK to terminate the application.
Click CANCEL to debug the application.."

and the System log says:

"The XXX Server service failed to start due to the following error:
The service did not respond to the start or control request in a timely
fashion. "

It seems that I don't even get to the "Main" of my service exe since
that would have shown in my own log files.

So my question is:

How do I get a more intelligent description of what goes on here (i.e.
the exception that causes the failure".
I tried turning on Dr Watson, but he won't load at system startup time,
it seems. Surely, there must be some tool that can be triggered to get
me a more detailed crash dump.

Thanks for any help.
/Per
 
M

mwazir

Hi,

If starting the service after logging on and it works without any problems,
then I would check for a couple of things

1. Is the service dependent on another service that is still loading. You
can set the dependency in the installer class.
2. What is the serviceAccount set to? You can specify the Account to
LocalSystem (or as a local or network service). You mentioned that its
running on a tightened windows 2000 box, maybe it does not have adequate
permissions until the user has logged.

Regards,
Mujahid
 
P

Per Bergland

mwazir said:
Hi,

If starting the service after logging on and it works without any problems,
then I would check for a couple of things

1. Is the service dependent on another service that is still loading. You
can set the dependency in the installer class.
Not that I'm aware of. What kind of service could it possibly depend on
when the .NET loader can't even get to "Main"? Is there any way to get
Unix-style progress info on the Console during boot so that I can see
the service startup order? Maybe something in machine.config is failing
- I noticed only yesterday that that prevents any .NET application from
launching.
2. What is the serviceAccount set to? You can specify the Account to
LocalSystem (or as a local or network service). You mentioned that its
running on a tightened windows 2000 box, maybe it does not have adequate
permissions until the user has logged.
Already set to LocalSystem, but do permissions really change for
LocalSystem during boot?

The main question is still:
Who wrote that entry to the event log along with the text "Press Cancel
to Debug and OK to continue? (and how do I get a better log - dr watson
seems unable to write crash dumps to %allusers%.... at boot time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top