title: How to get physical directory path to path created by server?
body: <p>I have an asp.net mvc web application that I deployed to a server. The app has an exe file that I keep in a known parent directory on my local machine and I call it using MapPath like this:</p>
  
  <pre><code>string path = HttpContext.Current.Server.MapPath("~/parentDirectory/");.
  </code></pre>
  
  <p>The problem is, the server where I deploy to, doesn't keep the file in the same directory and I therefore have no way of calling it during compile time using this method. Is there any way I can call the exe file dynamically just by its name or another way to get the server's path?</p>