getting error while try to start service
answer: if you are getting this error check the service name and service process installer service name. Both must be the same.
happy coding
Source: http://cut.lu/cddc2c
Also ensure that in the entry point for the exe (usually the Main procedure) an instance of the your service class (that derives from Service base is created).eg.
private static void Main()
{
var servicesToRun = new ServiceBase[]
{
new MyService1(),
new MyService2()
};
ServiceBase.Run(servicesToRun);
}
If you do not do this, say you do not include code to create instance of MySerivce2, as above, you will get the error message above when you try to start MyService2.
I've got same problem. My solution for this was to check the service name and service installer service name. Both must be the same.
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.ServiceName = "EmailService";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With