title: Using Server.MapPath in external C# Classes in ASP.NET
body: <p>I'm trying to get the absolute path of certain files in a C# class.  <code>Server.MapPath</code> works great of course for ASPX and their code-behind pages, but that doesn't exist in another class file.  I tried <code>HostingEnvironment.MapPath()</code>, but that complains that the relative virtual path isn't allowed.  Any thoughts?</p>
  
  <p><code>System.Web</code> is already imported.</p>