473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Service Problem - service on local computer started and then stopp

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.

--
Thanx,
Grigs
Nov 22 '05 #1
3 15858
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
--
Thanx,
Grigs

Nov 22 '05 #2
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.
--
Thanx,
Grigs
"Grigs" wrote:
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
--
Thanx,
Grigs

Nov 22 '05 #3
Thank you very much for posting you're solution on here. I've been struggling with the same problem for ages now and that's sorted it.

Cheers!
Apr 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bryan | last post by:
We created a Windows Service with C#. The service will start OK on computers that are a member of a domain, but when we try to start it on a server that is configured for a workgroup we get the...
14
by: Jasonkimberson | last post by:
Currently I am having a problem creating a windows service that monitors a mapped drive for events (using the FileSystemEventHandler). The service complies but fails to start: "The XMLWatcher...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
2
by: John David Thornton | last post by:
I've got a Windows Service class, and I put a System.Threading.Timer, and I've coded it as shown below. However, when I install the service and then start it in MMC, I get a peculiar message: ...
8
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite...
6
by: Joe | last post by:
C# .NET 2.0 I've got a Windows Service that works exactly as I expect it to. However, it does rely on a few Configuration settings. If the customer doesn't configure it correctly, the service...
3
by: Michael | last post by:
Hello, I have created a windows service in C# that watches a folder, then moves files place in it to another server. When I test this service on my local machine it runs great. I have had it...
16
by: sunil | last post by:
Hi, I have a service written in c# that I need to run as a "Network Service". I am using a setup project to install the service. If I install the service in User's Personal Folder, I get the...
13
by: dancer | last post by:
I have made a new post because when I try to respond to another, I get the error, "Article Rejected -- Ill-formed message id" This is in response to the advice of Juan Libre to install Net...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.