locked
After Deployment Windows Service getting Started automatically ... which was suppose to be manul...C# RRS feed

  • Question

  • Hi...

    i Created a Windows Service , which works fine in my local .. when deployed on cloud .. its starts the service automatically , which was suppose to start manually .. please some one help on this ... 

    thanks ..

    Ashrin

    Friday, July 13, 2012 9:54 AM

Answers

All replies

  • Check your service Installer class, I guess there you will find the code that is running the service automatically

    Check if this type of code is written in your Service

     ServiceController obj= new ServiceController("ServiceName"); 
        obj
    .Start(); 

    Because default option is Manual.

    --------------------------------------------------------
    Kapul


    • Edited by Kapul Bhatnagar Friday, July 13, 2012 5:08 PM Added some more helpful info
    Friday, July 13, 2012 4:32 PM
  • But am not using serviceController class at all... 
    Monday, July 16, 2012 6:48 AM
  • How you are installing the windows service? 

    you can try to set the "start type" of the 'serviceInstaller1' to automatic. By default the services will run manually. 

    you can find more information in the following link

    http://msdn.microsoft.com/en-us/library/htkdfk18.aspx

    http://msdn.microsoft.com/en-us/library/ddhy0byf(VS.80).aspx


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/

    Monday, July 16, 2012 11:28 AM