Windows service was started and then stopped

The netlogon service on local computer started and then stopped. Some services stop automatically if they have no work to do

Replies (4) 

Thank you for posting your query on Microsoft Community. We are glad to assist you.

I would suggest you to try following the suggestions given below and check, if this helps you to fix the problem.

Method 1:

You may try checking if the problem persists in Safe Mode.

Step 1: Safe Mode with Networking

Boot the computer in Safe mode with Networking and check if the issue persists. Follow these steps to start the computer in safe mode.

Click the link and follow the steps “Start your computer in safe mode

If the problem does not exist in safe mode, try to perform a clean boot and check.

Step 2: Perform Clean Boot.

Putting your system in Clean Boot state helps in identifying if any third party applications or startup items are causing the issue.

Refer: How to perform a clean boot in Windows
http://support.microsoft.com/kb/929135

Note: After troubleshooting, refer to this section «How to reset the computer to start normally after clean boot troubleshooting»

Method 2: System File Checker.

You may run the system file checker tool and check if it helps. SFC scan will scan for the corrupted system files on the computer. You may refer to the following article in order to use System File Checker tool appropriately.

Use the System File Checker tool to repair missing or corrupted system files.

Do get back and let us know the status of the issue, we will be glad to help you further. We, at Microsoft strive towards excellence.

Windows service started and then stopped

I have created a windows application which runs fine and then i try to run this application as a windows service. After i start the service i got the error like below

Below are the error log i got from the EventViewer\Application

Faulting application name: MyApp.Client.exe, version: 1.0.0.0, time stamp: 0x50fce240 Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdaae Exception code: 0xe0434352 Fault offset: 0x00009617 Faulting process id: 0x1a7c Faulting application start time: 0x01cdf7a1dcc54dc3 Faulting application path: E:\Email Service\Mobile\MyService\Main\Source\Client\Service\Service1\bin\Release\MyApp.Client.exe Faulting module path: C:\Windows\system32\KERNELBASE.dll Report Id: 2ef633e5-6395-11e2-8e41-e4115b2d2915

Читайте также:  Оптические приводы для linux

How can i resolve this error?

2 Answers 2

Its a very vague error. I can result from number of things and definitely not a code error.

  • Windows patch requires a restart. sfc /scannow on command prompt as admin.
  • The kernal.dll should normal exist on the location mentioned on the error else run the regsvr32 KERNELBASE.dll on command prompt as admin.
  • Restart your server.
  • Make sure correct framework is installed and any reference into your configs.
  • Correct service user if it was supposed to run with specific access or permission.
  • Make sure your application configuration is set to Any CPU to avoid 32bit and 64bit mismatch.
  • Make sure none of the system services are stuck in starting, if there are any easy thing to do is restart and validate or check your event logs to locate the specific issue

Ours was due to service user, wrong user was mapped which caused the issue.

I know this is an oldie but I was experiencing this issue and couldn’t find anything that was helpful so I hope this helps someone else!

The issue had to do with the sc create «YourServiceNameHere» command. When using this command you can supply the parameter type , providing the wrong value may be causing the issues.

When running the sc query «YourServiceNameHere» command, the result returned that the service was attempting to run using a shared process when it actually needed it’s own.

The resolution for me was to change my command from sc create «YourServiceNameHere» type= share to sc create «YourServiceNameHere» . After running the service create command with the type specified, change the output of the sc query command and shows it’s running in it’s own process and the service successfully starts and continues running.

I really hope this helps someone, it caused me much stress!

Windows service was started and then stopped

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..

Читайте также:  Restore default icons windows

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.

C# Windows Service — the service on local computer started and then stopped?

I am trying to create my first Windows Service, but so sad. after I started the service manually from services.msc, the message ‘the service on local computer started and then stopped. some services stop automatically is they have no work to do’

I am sure there must be some mistake in my code.

Forgive me if i did silly mistakes. This is my very very first Windows Service.

PS. I have already ticked ‘Allow service to interact with desktop’

3 Answers 3

Check to make sure the account your service runs under can access those files (including write access for the .wav and .mp3 files).

Your code might also be causing an unhandled exception. I’m not sure, but that might be visible in the event log. You can also get your service to write out messages explicitly to the event log (like in the case of an exception); check out this link: http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx

You didn’t create a running thread for the OnStart method. Basically, the service manager calls OnStart to start the service, and that call needs to finish in about 15 seconds or so. Internally, you should create a thread with a loop that actually calls your code over time. Like so:

Your service doesn’t really follow the pattern; you’re not doing things continuously, and that should be more of a console program.

Effectively, it’s because your service stopped doing anything as soon as you finished the OnStart method. It’s like what happens when you finish Main in a console program — the application just exited.

Читайте также:  Топ горячих клавиш windows

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.

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.

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