C# Windows Service Error 1053 The Service Did Not Respond
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have c# windows service error 1053 the service did not respond to the start Meta Discuss the workings and policies of this site About Us error 1053 the service did not respond windows 7 Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with error 1053 the service did not respond windows server 2008 r2 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 error 1053 the service did not respond in a timely fashion like you, helping each other. Join them; it only takes a minute: Sign up Error 1053 the service did not respond to the start or control request up vote 27 down vote favorite 1 I've written a Windows Service in C# that basically checks my db every minute for orders, generates a PDF from these orders, and
Error 1053 The Service Did Not Respond To The Start Or Control Request In A Timely Fashion
emails it. The logic works perfectly in my tests etc.. When i create the service, and install it using the setup project, when I go to start the service in the services mmc, I get: error 1053 the service did not respond to the start or control request in a timely fashion My OnStart method looks like this: protected override void OnStart(string[] args) { //writeToWindowsEventLog("Service started", EventLogEntryType.Information); timer.Enabled = true; } Basically, just enables the timer... so theres no process intensive call there. Where am I going wrong? I've tried setting the startup account to local system, network service etc... nothing works! Edit: Here is my code: (processPurchaseOrders is the method where the db is queried and pdf's are generated etc...) public partial class PurchaseOrderDispatcher : ServiceBase { //this is the main timer of the service private System.Timers.Timer timer; public PurchaseOrderDispatcher() { InitializeComponent(); } // The main entry point for the process static void Main() { #if (!DEBUG) ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Purchase
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
Windows Service 1053 Error During Startup
Us Learn more about Stack Overflow the company Business Learn more about hiring developers the service did not respond in a timely fashion windows 7 or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack error 1053 starting service windows server 2008 r2 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 Error 1053 “the service did not respond http://stackoverflow.com/questions/1673545/error-1053-the-service-did-not-respond-to-the-start-or-control-request to the start or control request in a timely fashion” up vote 1 down vote favorite 1 I am supposed to change the code for a VM-Manager in order that it can run on a new server. I changed all the addresses that referred to the old server but when I try to run the service I get the error message: Error 1053 "the service did http://stackoverflow.com/questions/20403349/error-1053-the-service-did-not-respond-to-the-start-or-control-request-in-a-tim not respond to the start or control request in a timely fashion". I read that this error is supposed to appear after 30 seconds but I receive it immediately after starting the service. Here is the OnStart Method: protected override void OnStart(string[] args) { RequestAdditionalTime(150000); WCFService.client.Connect("https://*************"); WCFService.client.Login(@"*********", "***********"); host.Open(); } I tried to increase the additional time but it didn't have any effect. There isn't the possibility for me to attach a debugger. Any suggestions how to approach this probem? I have tried to put a try-catch around it: try { RequestAdditionalTime(150000); WCFService.client.Connect("https://***********"); WCFService.client.Login(@"********", "**********"); host.Open(); } catch (Exception e) { File.WriteAllText(@"C:\Users\*********\Desktop\errorMessage.txt", e.ToString()); } But i received the same error message and no text file was created on the desktop. I wanted to try this patern: http://stackoverflow.com/a/2629741/2996227 but i don't really know where to put it. Should I put it into the "main" method of the programm? c# windows-services share|improve this question edited Dec 12 '13 at 15:59 asked Dec 5 '13 at 15:02 user666 62 You can debug windows services: stackoverflow.com/questions/2629720/debug-windows-service –BIDeveloper Dec 5 '13 at 15:22 I'm sorry but I don't really understand those solutions or they wouldn't work. My programm