This error i have experienced. when i going to start my application service while happened this error. Just start your service using sample application create one button click and then place this code. Its service start using ServiceController.

private void button1_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                ServiceController sc = new ServiceController("YottaMark Code Dispenser");
                if ((sc.Status.Equals(ServiceControllerStatus.Stopped)))
                {
                    sc.Start();

                    MessageBox.Show("Starting the  YottaMark Code Dispenser");
                }
                MessageBox.Show("Started the YottaMark Code Dispenser");
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }

0 comments

Related Posts Plugin for WordPress, Blogger...