title: Error 1053 "the service did not respond to the start or control request in a timely fashion"
body: <p>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 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: </p>
  
  <pre><code>protected override void OnStart(string[] args)
      {
          RequestAdditionalTime(150000);   
          WCFService.client.Connect("https://*************");
          WCFService.client.Login(@"*********", "***********");
          host.Open();
      }
  </code></pre>
  
  <p>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?</p>
  
  <p>I have tried to put a try-catch around it:</p>
  
  <pre><code>try
          {
              RequestAdditionalTime(150000);
              WCFService.client.Connect("https://***********");
              WCFService.client.Login(@"********", "**********");
              host.Open();
          }
          catch (Exception e)
          {
              File.WriteAllText(@"C:\Users\*********\Desktop\errorMessage.txt", e.ToString());
          }    
  </code></pre>
  
  <p>But i received the same error message and no text file was created on the desktop.</p>
  
  <p>I wanted to try this patern: <a href="https://stackoverflow.com/a/2629741/2996227">https://stackoverflow.com/a/2629741/2996227</a> but i don't really know where to put it. Should I put it into the "main" method of the programm?</p>