System.UnauthorizedAccessException when trying to upload a file
<p>I am trying to download a file from my computer in the localhost. But I keep getting the error
<br /> <br/>
System.UnauthorizedAccessException: Access to the path 'c:\users\zunair\documents\visual studio 2012\Projects\WebApplication2\WebApplication2\Uploads' is denied. </p>

<p>Here is my code</p>

<pre><code>if (FileExt == ".pdf")
{
    Response.ContentType = "Application/pdf";
    Response.AppendHeader("Content-Disposition", "attachment; filename=FileName");
    Response.TransmitFile(Server.MapPath("~/Uploads" + FileName));
    Response.End();
}
</code></pre>

<p>I get the error at <code>Response.TransmitFile(Server.MapPath("~/Uploads" + FileName));</code></p>
