title: Relative Path issue with .Net Windows Service..?
body: <p>I have a windows service which is trying to access an xml file from the Application directory. </p>
  
  <p><strong>Windows Service Installed directory</strong> : C:\Services\MyService\MyService.exe<br>
  <strong>Path of the xml file</strong> : C:\Services\MyService\MyService.xml</p>
  
  <p>I am trying to access the file using the following code.</p>
  
  <pre><code>using (FileStream stream = new FileStream("MyService.xml", FileMode.Open, FileAccess.Read))
    {
           //Read file           
    }
  </code></pre>
  
  <p>I get the following error. </p>
  
  <p>"Can not find file : C:\WINDOWS\system32\MyService.xml"</p>
  
  <p>My service is running with local system account and I don't want to use absolute path. </p>