What is the difference between Server.MapPath and HostingEnvironment.MapPath?
<p>Is there any difference between <code>Server.MapPath()</code> and <code>HostingEnvironment.MapPath()</code>? Does <code>Server.MapPath()</code> have any advantages over <code>HostingEnvironment.MapPath()</code>?</p>

<p>My original problem was mapping the file path on a server when the <code>HttpContext</code> is not present and I cannot pass a <code>Server</code> variable from <code>Global.asax</code> to my method. </p>

<p>I used <code>HostingEnvironment.MapPath()</code> instead since it doesn't need <code>HttpContext</code>. Are there any situations when these two methods will give different results?</p>
