title: ASP.NET Relative Path To File in Web.Config
body: <p>I want to specify a path to a file in my application in the Web.Config file, then call that path in a controller.
  From what I've found online, I'm most of the way there.</p>
  
  <p><strong>Web.Config</strong></p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="filePath" value= "~/App_Data/Physicians.xml" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>//Path of the document       
  string xmlData = ConfigurationManager.AppSettings["filePath"].ToString();
  </code></pre>
  
  <p>However, this is pointing to the wrong location.</p>
  
  <p><a href="https://i.stack.imgur.com/Hoj6U.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Hoj6U.jpg" alt="enter image description here"></a></p>
  
  <p>How can I point this to the file I have stored in the App_Data folder, starting from the root of my application?</p>