"atong99" <> wrote ...
> I simplified the issue. It is not easy to run the debugger. Somehow
> Vista shuts down my service.
I don't want to be unhelpful but ... we can't see your code, we can't see
your machine, we don't know what changes you made to cause the error, we
don't know what programming language or environment you're using, we don't
know what the service does or what security context it runs in, etc. So I
wonder what your expectations are, regarding the help we can provide? Some
magic switch or hotfix, which will make your service run? :-)
The error message indicates the Service Control Manager had to terminate the
service. It sounds like the service is starting, but then it hits an
unhandled exception (so hopefully, OnStart() is at least returning).
ZachD is correct - to debug this problem, you need to, well, debug the
problem. Running in the debugger can be a bit awkward but it is certainly
not impossible, nearly every service needs to be debugged sooner or later.
If you google for "how to debug windows services" you'll find many MSDN
articles, blogs etc about how other developers have worked around this
before. Here's a good start:
http://blogs.msdn.com/field_notes/ar...e-onstart.aspx
If a service runs okay on XP but fails on Vista, there are likely to be two
main causes:
- the service hits a security or permissions problem in the more secure
environment of Vista eg it cannot write to a protected location like
C:\Program Files, or C:\Windows. The 0xC000005 bubbles up and is unhandled.
- the service tries to interact with the user session, whereas in Vista it
will be running in Session 0, and the Interactive user will be in Session 1
or higher.
There could be many other problems, but these seem to be the most common
issues migrating to Vista.
For programming issues, you'll probably get better results from one of the
MSDN forums; this microsoft.public.windows.vista.general newsgroup is mainly
for end-users. Take a look at
http://social.msdn.microsoft.com/For...y/visualstudio. There's
lots of helpful folks there but, be warned: you'll need to ask your question
in a way that let's people help you!
Hope it helps,
Andrew
--
amclar at optusnet dot com dot au