title: How do I resolve a path relative to an ASP.NET MVC 4 application root?
body: <p>How do I resolve paths relative to an ASP.NET MVC 4 application's root directory? That is, I want to open files belonging to the application from controller actions, referenced like <code>~/Data/data.html</code>. These paths are typically specified in <code>Web.config</code>.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>By 'resolve' I mean to transform a path relative to the application's root directory to an absolute path, .e.g. <code>~/Data/data.html</code> &rarr; <code>C:\App\Data\Data.html</code>.</p>