473,625 Members | 3,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 15878
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
grazza98
1 New Member
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
15357
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 following error in the event log: Event ID: 7001 Description: The {Service Name}service depends on the Net Logon service which failed to start because of the following error: The service has returned a service-specific error code.
14
7214
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 service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Preformance Logs and Alerts service." The Service has no problem starting if i point the folder to be monitored to...
3
14908
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 swLog As StreamWriter = File.CreateText("C:\myLog.txt") swLog.WriteLine("My Windows Service has just started.") swLog.Close() : swLog.Flush() End Sub
2
4054
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: The MyService service on Local Computer started and then stopped. Some services stop automatically if they ahve no work to do, for example, the Perforamnce Logs and Alert service. I tried switching to a System.Threading.Timer and that didn't work...
8
55672
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 everything I've tried, I cannot get MySQL to start as a Windows service. However, I AM able to get it started via the mysqld-nt --console command. Here is my (funky) setup:
6
8686
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 shouldn't start. So I've put in some try...catchs, but what I'm not sure how to do is not allow the service to start. If attempted to start with the NET START command, throwing an exception keeps the service from starting, but the message...
3
2264
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 running for about 5 days now. I have put in plenty of error coding just in case something goes wrong. My problem is that I have tried to move it to a Windows 2003 server. It installs with no problem. When I start the service it gives me a message...
16
5573
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 following error: "Could not start the <servicenameservice on Local Computer. Error 5: Access is denied." If I install the service in ProgramFiles folder, I get the following error:
13
6636
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 Framework Service Pack 1 in order to use ASP.net 1.1 and the net Framework 1.1 ------------------------------------------------------------------------------------------------ I found the following file, "svcpack.log" at C:\WINNT. It contains many...
0
8253
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6116
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1499
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.