title: Get full path to file while debugging using IIS Express
body: <p>I have a .NET application that I am trying to debug and part of my application loads a file from my project.  This file is located at</p>
  
  <pre><code>C:\Users\USER_FOLDER\Documents\Visual Studio 2012\Projects\MY_PROJECT\_templates\myFile.html
  </code></pre>
  
  <p>In my code, I specify a relative path to the file and use the DirectoryInfo class to get the full directory path to my file:</p>
  
  <pre><code>string myFile = (new DirectoryInfo("_templates/myFile.html")).FullName;
  </code></pre>
  
  <p>However, this returns the following path (extra \'s as escape characters):</p>
  
  <pre><code>"C:\\Program Files\\IIS Express\\_templates\\myFile.html"
  </code></pre>
  
  <p>I was expecting the path that is returned when debugging in IIS Express would match the first path I listed, not the third.  Why is this?  Is there something else that I need to set up in my project to have it derive the paths properly?  I'm assuming that this would not happen if I deployed my code to a IIS7 site, but I haven't gotten to that testing level yet.</p>