Error 1053 Windows Service .net
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Windows service will not start (Error 1053) up vote 10 down vote favorite I have a Windows Service that I am trying to debug. Now it fails to start even though the current code used to work. The error is: Windows could not start the MyService service on Local Computer Error 1053: The service did not respond to the start or control request in a timely fashion. To isolate the error, I tried to comment out everything. The main method looks like this: TextWriter tt = new StreamWriter(@"C:\startup.text", true); tt.WriteLine("Starting up the service"); tt.Close(); ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new MyService() }; TextWriter tt2 = new StreamWriter(@"C:\startup.text", true); tt2.WriteLine("Run..."); tt2.Close(); It prints out both "Starting up the service" and "Run..." to the log file. I also stripped the inside of MyService so it's empty. There is a try/catch around any code, which now is reduced to some log lines like above. I never enters the catch statement, which would have logged it. Everything in OnStart has been commented out: protected override void OnStart(string[] args) { } So I'm basically out of ideas. I thought the error was because the Start method never finishes (or doesn't within 30 seconds). Is there some other method that is called? Any ideas are appreciated. Extra info: The constructor in MyService is empty. If I insert some Thread.Sleep(5000) lines, then it takes longer beofre the error message about Error 1053 pops up. The Main method seems to have to exit (without error). c# windows-services share|improve this question edited Sep 13 '11 at 13:25 asked Sep 13 '11 at 13:20 Kasper Hansen 2,03364678 Make sure you catch all the unhandled exceptions and write them to your log. For example: stackoverflow.com/questions/58280/… ... that might give you some more information on why it is failing. –Christophe Geers Sep 13 '11 at 13:23 add a comment| 1 Answer 1 active oldest votes up vote 14 down vote accepted You are missing ServiceBase.Run call: ServiceBase[] service
not respond to the start or control request in a timely fashion Visual Studio Languages , .NET Framework > Visual C# Question 0 Sign in to vote Hi All, I created a basic windows service in C#. When i start it from AdministrativeTools/Services, this message pops up: "Error 1053: The service did not respond to the start or control request in a timely fashion" I have .NET 3.0 on my machine with XP professional. I have read lot of info regarding this error,there are so many results for this error when searched but no appropriate fix.All they say if http://stackoverflow.com/questions/7402557/windows-service-will-not-start-error-1053 there is lot of logic inside OnStart(), which may consume more than 30 seconds, then you may get time out error. But that is not the case. The logic in my OnStart() should hardly take 1 second. In the function OnStart(), i go into a small loop to print 10 numbers to log. I have even tried spawning a thread and executing my logic in it. Then also the same https://social.msdn.microsoft.com/Forums/vstudio/en-US/39e56d2c-fe2d-4118-9058-bc7b66d647dc/windows-service-start-up-error-error-1053-the-service-did-not-respond-to-the-start-or-control?forum=csharpgeneral error pops up. The progress bar showing: service starting is hardly for a second and then the time out error pops up. I am running the service under a particular user account, which is administrator on that machine. Responses are really appreciated. regards,Santosh Jami. Wednesday, February 20, 2008 7:17 PM Reply | Quote Answers 0 Sign in to vote did you check your event log from EventVwr? service actions are always loggin system event. you can check or find that reason of starting service failure. in my guess, log part is may have some problem. logging to where? if to file, then is file created successfully? Thursday, February 21, 2008 5:20 PM Reply | Quote All replies 0 Sign in to vote did you check your event log from EventVwr? service actions are always loggin system event. you can check or find that reason of starting service failure. in my guess, log part is may have some problem. logging to where? if to file, then is file created successfully? Thursday, February 21, 2008 5:20 PM Reply | Quote 0 Sign in to vote Hi!I got the same error when I tried to use the window service to launch a Ser
in a timely fashion" when attempting to start, stop or pause a service Modified on: Tue, 26 Apr, 2016 at 12:13 PM PROBLEM https://support.threattracksecurity.com/support/solutions/articles/1000071019-error-1053-the-service-did-not-respond-in-a-timely-fashion-when-attempting-to-start-stop-or-pause When attempting to start, stop or pause a service, one of http://www.codeproject.com/Questions/431821/window-service-is-giving-error the following error messages is encountered: "Error 1053: The service did not respond to the start or control request in a timely fashion.""Error 7000: The
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question View Unanswered Questions View All Questions... C# questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ window service is giving error 1053 Rate this: Please Sign up or sign in to vote. See more: service Hi, When I am trying to run the service from the task manager, I am geeting this error "Error 1053: The service did not respond to the start or control request in a timely fashion" here is my code on start method protected override void OnStart(string[] args) { try { objTimer.Elapsed += new ElapsedEventHandler(OnElapsedTime); //step 2: set interval to 1 week (1 minute= 60,000 milliseconds) objTimer.Interval = 60000 * 60 * 24 * 7; //step 3: enabling the timer objTimer.Enabled = true; } catch (Exception ex) { WriteLog(ex); //SROEventLog.WriteEntry("Exception occured in OnStart()" + ex); } } Could anyone please help me to fix this issue Thanks in advance Sandeep Posted 31-Jul-12 1:18am Sandeepost608 Add a Solution 2 solutions Top Rated Most Recent Rate this: Please Sign up or sign in to vote. Solution 1 Accept Solution Reject Solution As reported by Microsoft, when you stop or pause a managed Microsoft Windows service,