Windows service started and then stop

Services start but then stop immediately

My problem was discovered when One Care reported that its’ firewall was not started. I tried starting it but it could not start. I have followed all the instructions re removing, cleaning and reinstalling One Care but all has failed and I am currently in discussion with the support team. I think this is a symptom of another issue. At about the same time as One Care failing, the windows fax service also stopped working. I have tried starting the services but windows reports that the service started then stopped possibly because other services were not using it.

It is possible that an update to Nokia PC Suite which also took place at the same time could have something to do with this issue.

To cut a long story short, Windows Live One Care Firewall cannot start nor can Windows Fax. I am yet to discover other services that have ceased operting.

Well robin i can give you a suggestion to try..its not a solution however but will point us in the right direction.

the probable causes where services fail to run are:

1.there is no enough memory in the physical memory to create a process thread(which is unlikely in modern computers)

2. a file or a library file required during the execution by the process or the service may either be corrupt or missing(possible)

3.some of the dependent services for the main service fail to start as a result even the resulting thread fails to execute due to missing dependencies. (very likely).

what i would suggest is that go to start->run and then type «services.msc» and locate the one care service..then double click on it and in the properties window which pops look at the dependencies tab. and check all the dependent services if they are running or disabled. if one or multiple dependencies exist and if any one of them fails the main service will stall.

if you find nothing strange there or any dependent service refuses to run then try checking or repairing the system file integrity.

in the administrator command prompt try running the «sfc /scannow». its recommended to pop in your vista dvd into the tray.

hope this should help you to set afoot on right track. if not please do post back.

The Windows Defender Service on Local Computer started and then stopped.

When attempting to start defender in services.msc I get this message: The Windows Defender Serviceservice on Local Computer started and then stopped. Some services stop automatically if they are not in use by services or programs.

Читайте также:  Нет изображения после перезагрузки windows

This started after today’s update 8/7/2015.

I was able to start Windows Defender Network Inspection Service but it says startup type is Manual. That doesn’t seem right.

Replies (6) 

Thank you for being part of Windows 10 family.

Sorry to know that you are facing issues with Windows 10.

In order to help you better, please provide the information:

Have you installed any third party security software on the Computer?

If so, then i would suggest you to disable or uninstall the third party security software and check if the issues persist.

Disable Anti virus:

NOTE: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you shouldn’t disable your antivirus software. If you have to temporarily disable it to install other software, you should re-enable it as soon as you’re done. If you’re connected to the Internet or a network while your antivirus software is disabled, your computer is vulnerable to attacks.

Refer to the below methods and check if it helps.

Method 1: I suggest you to perform the system maintenance troubleshooter. It will resolve the common system problems.
1. Tap on Windows Key and click on search bar.
2. Type “Troubleshooting” without the quotes and click on Troubleshooting.
3. Then click on System and Security.
4. Click on System Maintenance.
5. Click on Next and follow the prompts to run the troubleshooter.

If the issue still persist, refer to the below method.

Method 2 : I suggest you to perform a System File Checker of the Computer and check if it helps.

1. Press Windows Key.

2. Then type “CMD ” without the quotes and right click on it.

3. Select Run as Administrator .

4. Then type” sfc /scannow ” without the quotes and hit on Enter Key .

If the issues still persist, refer to the below methods.

Reply with the information, so that we can help you better.
Hope it helps. Contact us if you need any further assistance, we will be glad to help.

Windows Service started and then stopped using Topshelf

I am using Quartz.net and I am trying to get the Quartz server to start-off in a Windows Service. I have created a Windows Service Project and included the Quartz.net libraries. In my Service class I have:

I have also created a Windows Service Installer and have successfully installed the Windows Service in Visual Studio’s command prompt using:

Читайте также:  No internet explorer in windows features

When I view my service in the Windows service list and try to start the service — I get a message dialog box:

Here is the output I have logged to the event viewer (log4net):

Windows Events

Does anyone know how I can get this service to start without this error(s) being thrown?

Thanks in advance.

4 Answers 4

I have created a Windows Service Project . I have also created a Windows Service Installer and have successfully installed the Windows Service in Visual Studio’s command prompt using: installutil MyWindowsService.exe

Topshelf services are already based on ServiceBase and do their own installation — you have a console application which you can run along with your app in development to see it’s working, then when you want to install it as a service you go to a command prompt as an administrator and call MyWindowsService.exe install — see the documentation for all options. It may work wrapped in another service, but I don’t see why you’d want to do so.

There’s a basic example of a functional service in the docs.

If you do need an installer, there’s one at http://www.bjoernrochel.de/2010/01/09/how-to-integrate-a-topshelf-based-service-with-vs-setup-projects/ (but Topshelf’s command line syntax has changed since that was written, and it needs updating.)

(Edit: I just noticed that events number 3 and 4 contain the text «Please run ‘MyWindowsService .. install’)

C# Windows Service — Started and then Stopped Automatically

I am creating this windows service by following the instructions at MSDN Walkthrough: Creating a Windows Service and after successful installation, I go to Services.msc to Start the Windows service and before it finishes starting up I get the following message:

The EIWindowsService service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

I know the Windows Service starts ok because there is an entry to the log file stating that the service started. I did some research before posting on here and the answer from Some Services Stop Automatically states that the problem could either be that the OnStart method is throwing an error, or that the OnStart is not kicking off a thread. So I modified my code so that the only thing within the OnStart is the starting of two timers and the log entry therefore needing no exception handling. I also added a thread to «jump» to another method.

I tried the windows service again and I know that it «moved» to the new method that the thread pointed to because I had a log entry in there that threw aFormatException error due to some conversion I was doing. I commented out the conversion and the windows service still just began to start up and then stopped automatically.

Читайте также:  Очистить буфер обмена linux

Further research indicated to me that I might need a loop to keep the processing within the method, so I took information from C — Windows Service the service on and set up an infinite while loop. I also found that there might be Garbage Collection going on and established a KeepAlive statement for the timers as suggested in Examples section of MSDN Timer Class. Still the same issues.

At this point I feel I’ve exhaused all the research I can do so it would be appropriate to post my question here. All my code is below and I will note that before I performed any change I uninstalled the Windows Service, removed the Setup Project, and deleted the installers from the C# code. I then made changes and started back over with the instructions in the Walkthrough starting at the point where it instructs how to setup the installers. I did this each time because I found that if I made changes and did not uninstall the Windows Service, remove the Setup Project, and delete the installers, then my changes would not take effect on the currently installed windows service.

Any assistance you can give would be most appreciated. I will be here for another 15min and then I will check this first thing tomorrow.

Windows service started and then stop

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I have a windows service and it was working fine, and today I tried to stop it and unlike the usual stop process, this one took a longer time. The next time I want to start the windows service, it raise an error that the service started and then stopped, it also said that service with no job stops automatically. When I checked the event log, there is no event about my service. My service worked well yesterday, in fact, it worked as usual just before I tried to stop it . but then I don’t know why the error appeared, I don’t think I did any changes to the database..

Any solutions ? or if someone can share his/her own problem similar to this

What my windows service do: read a log file, write to log file, then access database, then execute a stored procedure in 2 hours interval..

Edit: I even tried to restart my computer after the problem keep happening when i try to start the service, but it doesn’t solve the problem.. now I cant start my service. One way I found to solve this problem is by re-installing the service. However, I need a better solution because I don’t want to keep re-installing the service if this problem appeared.

Оцените статью