Possible to fool HTTPContext.Current?
<p>I have this line of code in an assembly:</p>

<pre><code> HttpContext.Current.Server.MapPath
</code></pre>

<p>This works great if the assembly is being used in a web service. </p>

<p>but if I take it out of the web service its obivously not going to work, because HTTPContext does not exist. </p>

<p>Is it at all possible to fool httpContext into thinking it exists, really just to get the relative path structure of a directory?</p>

<p>I mean somehow manually creating the HTTPContext object, and assigning it a base directory?</p>

<p><strong>Update</strong></p>

<p>Is there a more generic approach to : HttpContext.Current.Server.MapPath</p>

<p>Something that can work in executables, and something that can work in web?</p>
