title: c# windows service with filewatcher
body: <p>First time posting long time reader.</p>
  
  <p>I built a working filewatcher inside of a windows forms application functioning 100% properly before moving it to a windows Service and am now recieving two seperate issues.  This file watcher reads a flatfile for line updates(lastwrite), deletes/recreates file(streamwriter), and finally parses through a strongly typed data set and then uploads to an SQL server.
  (This is my first Windows Service)
  Questions:<br>
  1. Does the double event trigger in filewatcher effect the service differently then a forms application?<br>
  2. Does anyone have an answer about why the thread will break if the class I am calling has no issue?<br>
  3. Are there any known issues with Windows Authentication through a windows service?<br>
  4. Does anyone have any strong debug methods for windows services?</p>
  
  <p>Here is my code from the windows Service, thanks in advance and my apologies if there is a silly mistake in the code, again first time making a windows service.        </p>
  
  <pre><code>    FileMonitor m_FileMonitor;
      public WindowsService()
      {
          InitializeComponent();
      }
      protected override void OnStart(string[] args)
      {
              try
              {
                  Thread myThread = new Thread(DoTheWork);
                  myThread.Start();
              }
              catch
              {
  
              }
  
      }
      void DoTheWork()
      {
          m_FileMonitor = new FileMonitor(Properties.Settings.Default.PathToFileToWatch, Properties.Settings.Default.PathToErrorLog);
      }
      protected override void OnStop()
      {
          // TODO: Add code here to perform any tear-down necessary to stop your service.
      }
  </code></pre>