title: What could cause a Windows Service to hang when a Console App doing the exact same thing using the exact same base libraries doesn't?
body: <p>I hate asking questions like this - they're so undefined... and undefinable, but here goes.</p>
  
  <p>Background:
  I've got a DLL that is the guts of an application that is a timed process.  My timer receives a configuration for the interval at which it runs and a delegate that should be run when the interval elapses.  I've got another DLL that contains the process that I inject.</p>
  
  <p>I created two applications, one Windows Service and one Console Application.  Each of the applications read their own configuration file and load the same libraries pushing the configured timer interval and delegate into my timed process class.</p>
  
  <p>Problem:
  Yesterday and for the last <em>n</em> weeks, everything was working fine in our production environment using the Windows Service.  Today, the Windows Service will run for a period of around 20-30 minutes and hangs (with a timer interval of 30 secods), but the console application runs without issue and has for the past 4 hours.  Detailed logging doesn't indicate any failure.  It's as if the Windows Service just...dies quietly - without stopping.</p>
  
  <p>Given that my Windows Service and Console Applications are doing the exact same thing, I can only think that there is something that is causing the Windows Service process to hang - but I have no idea what could be causing that.  I've checked the configuration files, and they're both identical - I even copied and pasted the contents of one into the other just to be sure.  No dice.</p>
  
  <p>Can anyone make suggestions as to what might cause a Windows Service to hang, when a counterpart Console Application using the same base libraries doesn't; or can anyone point me in the direction of tools that would allow me to diagnose what could be causing this issue?</p>
  
  <p>Thanks for everyone's help - still digging.</p>