Error when downloading document using Response.TransmitFile()
<p>I have a webpage that contains a link to allow the user to download a document. The code I am using works if the user is downloading a document from a physical location (i.e C:\filename) and for documents stored as part of the website (i.e ~/Documents/filename). </p>

<p>But it does not work when trying to download a file from a network location and the following error occurs:  '<code>Could not find a part of the path</code>'</p>

<p>Here is the code I have:</p>

<pre><code>     Response.ContentType = "application/msword";
        Response.AppendHeader("Content-Disposition", "attachment; filename=filename.doc");
        Response.TransmitFile(Server.MapPath(@"\\ad.website.com\public\shared\filename.doc"));
        Response.End();
</code></pre>

<p>I have researched this error and it seems it can be caused by permissions or IIS setup. Is this the case  or do I need to update the code?</p>
