title: How to use Server.MapPath to get location outside website folder in ASP.NET
body: <p>When my ASP.NET site uses documents (e.g. XML), I normally load the document as follows:</p>
  
  <pre><code>Server.MapPath("~\Documents\MyDocument.xml")
  </code></pre>
  
  <p>However, I would like to move the Documents folder out of the website folder so that it is now a sibling of the website folder. This will make maintaining the documents considerably easier.</p>
  
  <p>However, rewriting the document load code as follows:</p>
  
  <pre><code>Server.MapPath("../../Documents/MyDocument.xml")
  </code></pre>
  
  <p>results in a complaint from ASP.NET that it cannot 'exit above the top directory'.</p>
  
  <p>So can anyone suggest how I can relatively specify the location of a folder outside the website folder? I really don't want to specify absolute paths for the obvious deployment reasons.</p>
  
  <p>Thanks</p>
  
  <p>David</p>