Service runs then dies
<p>I'm running Win 7 Pro 64-bit.  I wrote a service in C# using the .NET 4 framework.  It installs properly and starts to run.  I know that it runs because it writes some output to a log file.  However, after a few seconds it dies.  When I use Visual Studio 2010 Pro to run this same code not as a service it never dies.  So, my obvious question is regarding the appropriate approach for debugging this since I can't figure out why it should die as a service but not die as a non-service.  I've put writes to the log file in several places in the code but it seems to die in a different place every time.  The application has 3 threads.  Any suggestions are welcomed.</p>
