Is there any reason to use Server.MapPath() to reference a file store?
<p>I have seen several developers perform:</p>

<pre><code>string fileStore = Server.MapPath(@"~\someDirectory");
File.Create(fileStore + "someFileName.xxx");
</code></pre>

<p>I find that this makes unit testing difficult.  Since I test with MSTest, there's no HTTP context, so this code just flat out fails.</p>

<p>Instead, I store my file paths in web.config.</p>

<p><code>string fileStore = ConfigurationManager.AppSettings["fileStore"];</code></p>

<p>This works with unit tests.  Why do developers use <code>Server.MapPath()</code> in this way?  Are there some benefits I'm unaware of?</p>
