title: Windows Service Fails on Launch
body: <p>I'm trying to write a windows service. It installs fine, but fails when I run it with the following exception.  I've searched for the string "MyNewProgramService", but I can't find any conversions that would throw this error.  I've also added try/catch blocks to a bunch of code with custom exception handling without finding where this exception is occuring.  I'm thinking it's somewhere in the auto-generated configuartion/setup code.  Any ideas?</p>
  
  <pre><code>Event Type: Error 
  Event Source:   MyNewProgram Event 
  Category:   None Event 
  ID: 0 
  Date:       4/15/2010 
  Time:       12:48:34 PM 
  User:       N/A 
  Computer:   20F7KF1 
  Description: Service cannot be started. System.InvalidCastException: 
  Conversion from string "MyNewProgramService" to type 'Integer' is not valid. ---&gt;
  System.FormatException: Input string was not in a correct format.    
  at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value,
       NumberFormatInfo NumberFormat)  
  at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)    
       --- End of inner exception stack trace --- 
  at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
  at TaskManagerFailureHandlerService.MyNewProgramService.OnStart(String[] args)
  at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
  </code></pre>