Saturday, February 5, 2011

The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs

Recently i have created a Windows service,then i have installed on my windows7 machine.
When i tried start the service i got the follwing error.
The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs.”
I gone through the problem i have tried so many ways to get out of the problem finally i got the solution as follows.
1)      Click Run Command from start buttin
2)      Enter Services.msc then click OK,you will get all the services in your computer.
3)      Select your service and right click on the service and select Properties
4)      Goto Logon Properties à select  Local System Account then click OK
Now try to start you service you will success.

C# 2008 Programmer's Reference (Wrox Programmer to Programmer)

37 comments:

  1. Thanks Boss ........... Nice solution ... Its working for me ......... and I was searching this from one week..

    Thanks again .....
    Akhil

    ReplyDelete
  2. I followed these steps but doesn’t seems to be solving my problem. I have a 32bit and 64bit xp supported setup file for imagelan, and am willing to install on win7 as there are no other versions available, the setup for 32bit completes successfully and lists down the service, but am getting this same error even after following these steps.

    ReplyDelete
  3. May be you doesn't have proper rights for the database/file that service depends,and Check
    if you have enough disk space where the service is installed and also try to clear Event Logs

    Look at this URL to clear Event Logs

    http://technet.microsoft.com/en-us/library/cc722318.aspx

    ReplyDelete
  4. Hi,

    I have this similar issue as well, tried your solution but doesn't solve.

    My service is actually a java apps that listening to a local port and initialized session pool.

    i tried manually start the service but it stopped immediately.

    cleared and checked the event log and system log, nothing shows on event log. System log shows the service start and service stopped.

    regards,
    Dennis

    ReplyDelete
  5. i tried the solution but i could not solve my problem....can u pls suggest any more ways to solve this

    ReplyDelete
  6. Had similar problem. Starting with eventlog is good point as in my case it was invalid setting in app.config and it was displayed in eventlog in oppposite that nonsence error I got when trying start service.

    ReplyDelete
  7. Worked with me as well.. Thanks a lot!!

    ReplyDelete
  8. I have the same error!! Can somebody help us?

    ReplyDelete
  9. I had a same problem,to avoid the error like
    "The xyz service on local computer started and then stopped. some service stops automatically if they have no work to do, for example performance log and alert service"
    I have removed the changes made in app.config file,
    Worked for me.
    Thanks

    ReplyDelete
  10. For me the same issue came because of a wrong setting in my app.config file. I changed the setting and the issue resolved

    ReplyDelete
  11. i installed my service with a local account on windows server 2008 and it is giving me this error message. do you know any way to help me out?? please my address is t3x.ltsr@gmail.com

    ReplyDelete
  12. Hi,
    Where is the app.config file and what i need to edit in that...kindly guide i also facing the same issue...while starting SQLSERVER AGENT and MSSQLSERVER.....Pls guide me...

    ReplyDelete
  13. THANKS IT Working, It is Great Solution

    ReplyDelete
  14. Hi,
    I am trying to configure a weblogic admin server as windows service and i get the same problem. i have tried to set it up as you have mentioned . but it doesnt work. any idea?

    any kind of points will be great help.

    ReplyDelete
    Replies
    1. Hi same issue for me , I can start the Admin server from command line as:
      beasvc -debug "beasvc base_domain_AdminServer"
      but can't do it from services console , have I to restart server ?

      Delete
    2. Hi Please send me if you find a solution for this.

      Delete
  15. In sql server configuration
    Disable VIA protocol...
    This will also solve your prob easily than looking into logs

    www.parigh.com

    ReplyDelete
  16. If it does't work any idea,please update your computer.
    -------------------------------------------------------------
    For Example:
    Update for Windows Server 2003 x64 Edition
    http://www.microsoft.com/downloads/details.aspx?FamilyId=C174BA3C-8C6E-4798-B9F9-27276028F274
    -------------------------------------------------------------

    ReplyDelete
  17. for me it is not work :( my service is "postrgessql 9.1"

    ReplyDelete
  18. I tried with your solution but it is not working

    ReplyDelete
  19. Nice work but it is not working in oracle lstnr service

    www.forgegeek.com

    ReplyDelete
  20. As many people have said, a simple error from a bad web.config parameter can cause this error. Check your web.config!

    ReplyDelete
  21. Either that or you ca just close the service list windows, reopen it and try again! It works...

    Also, if problems still persist, chekc your event log, it will point the error for you!!

    ReplyDelete
  22. This is not working for me.. Can someone suggest alternative approach?

    ReplyDelete
  23. I tried to check "Local system account" and it worked but after that some days, this issue raised again. Someone help me please!

    ReplyDelete
  24. Sorry Boss..Above solun not working for me..
    Please suggest me another solun.thx in Adv..!@!

    ReplyDelete
  25. For specific to "Performance Logs and Alerts" service follow the below steps.
    1) got to run prompt, open "perfmon"
    2) goto counter logs
    3) start system overview.

    This is will start your performance logs and alerts.
    This resolved me issue. thanks

    ReplyDelete
  26. Thanks a lot, it works for me.

    ReplyDelete
  27. first of all you need to know the cause of problem, so check log file then proceed to solution. These problems are mostly due to incorrect values in services.config files.

    ReplyDelete
  28. Event logs helps a lot for getting the reason.
    i faced log4net dll version mismatch.

    ReplyDelete
  29. When I stopped my antivirus from scanning, IT WORKED.
    So simple.
    The service not working was VMware DHCP Service.

    ReplyDelete
  30. Thank you for this unique information :)

    ReplyDelete