Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 122641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:09:39+00:00 2026-05-11T04:09:39+00:00

I have a .Net service that has begun to refuse to start – the

  • 0

I have a .Net service that has begun to refuse to start – the system log shows that it ‘was successfully sent a start control’ and then five seconds later the ‘service entered the stop state’. I have the Main() function of my service class wrapped in a try/catch block — but when this situation occurs, no errors appear in my events log from my service.

I would like to know what the problem is. If there is some exception that is not being caught – where would it be caught? Below is the code in which I run the service.

using System; using System.Collections.Generic; using System.Linq; using System.ServiceProcess; using System.Text;  namespace MyServerService {     static class service     {         /// <summary>         /// The main entry point for the application.         /// </summary>         static void Main()         {             try                 { #if DEBUG                      System.Diagnostics.Debugger.Launch();  #endif                      ServiceBase[] ServicesToRun;                     ServicesToRun = new ServiceBase[]                  {                      new MyService()                  };                     ServiceBase.Run(ServicesToRun);             } catch (Exception ex)             {                 System.Diagnostics.EventLog.WriteEntry('MyServerService', 'Main() Error: ' + ex.Message + ex.InnerException, System.Diagnostics.EventLogEntryType.Error);             }         }     } } 
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T04:09:39+00:00Added an answer on May 11, 2026 at 4:09 am

    In this situation, I was writing the to the Windows Application log — in the production environment, the log was full. I’m unsure of what the debugging technique should be to ‘catch’ this class of a problem – but that was the problem for us.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a service that has some settings that are supported only over net.tcp.
I have a .NET 2.0 application that has recently had contributions that are Service
I have a simple ASP.NET hosted WCF Service that has several methods that all
I have a .NET Windows Service that has a timer with interval set to
I have a Windows service that has been scheduled using Quartz.NET . I have
I have an ASP.NET (.asmx) Web Service project that has a method like: public
I have WCF service that has http and net.tcp endpoints. I have deployed the
I have a WCF service that has the contract published on a Net.Tcp MEX
I have a .Net 4 project that has to consume a SOAP Web Service.
I have a .NET web-service client that has been autogenerated from a wsdl-file using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.