title: How can I use Server.MapPath() from global.asax?
body: <p>I need to use <code>Server.MapPath()</code> to combine some files path that I store in the <code>web.config</code>.</p>
  
  <p>However, since <code>Server.MapPath()</code> relies on the current HttpContext (I think), I am unable to do this.  When trying to use the method, even though its "available", I get the following exception:</p>
  
  <blockquote>
    <p>Server operation is not available in this context.</p>
  </blockquote>
  
  <p>Is there another method that can map a web root relative directory such as <code>~/App_Data/</code> to the full physical path such as <code>C:\inetpub\wwwroot\project\App_data\</code> ?</p>