Service Problem - service on local computer started and then stopp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have created Windows Services before using C# and have had no problems.
Not to mention, the one I currently am having problems with worked great for
the first 3 days. Then I added some more SQL code and went to test it again
and now whenever I start the Service up I get the following error message...

The <xxx> service on local computer started and then stopped...

I tried a few things like removing the new code and such without any
success. I even wound up creating a brand new Project as a Windows Service
and all this one does at the moment is wait for a timer to elapse in 10
seconds and then it will write an entry to the log file. I also have it
logging at OnStart and OnStop. None of the logging happens.

Since there is really no code other than event log stuff in the new project,
I have to assume it is some other something that is halting my service. this
is really killing my time and any solution would be Greatly appreciated.
 
For a little more information:

I just took the slimed down version of the Windows Service to another
machine. Did the InstallUtil and started it. It started and did the logging
as expected. I then manually stopped it and all went as it should.

Nothing my event logs seems to point to anything that is of any use. The
application log has nothing in it when I attempt to start it. The System has
two events (7035 - Successfully sent a start control) then right after that
is (7036 - entered the stopped state.)

I tried to run it in Safe Mode but it would not let me start that service in
Safe Mode.

PLEASE help
 
Well I figured out what the problem was. Oddly enough, the debugger wasn't
coming until more recently (don't believe I changed anything.) I did look at
the message that was coming up in the debugger and it was that the Log File
was full.

I simply changed it from the default of overwrite every 7 days to overwrite
as needed (and changed it to 1024) and EVERYTHING WORKS AGAIN.

Uuugh, what a stupid default setting. At least since problems occur when
it's full.
 
Back
Top