title: Creating download link to a file on a file server
body: <p>I'm looking for a way to (easily, by preference ;)) create a download link to a file on a separate file server.</p>
  
  <p>The situation is as follows: the application I'm developing (asp.net 2.0 in vb.net but I have a similar issue in c#, either solution works for me) will be run internally for a company.
  As is good practice, the file storage and web application are on two separate servers.</p>
  
  <p>I basically need to be able to create a download link to a file, the only available URL i have to access the file is <em>\servername\folder1\folder2\folder3\file.txt</em> (can be any sort of file)</p>
  
  <p>Weblinks simply don't work. This is how it's currently set up:</p>
  
  <pre><code>tablerowfield.Text = String.Format(
      "&lt;a href=""\\servername\folder1\folder2\folder3\{0}"" 
          target=""_blank""&gt;Click me&lt;/a&gt;",
      filename)
  </code></pre>
  
  <p>Which doesn't work for obvious reasons. It used to be set up to write that file to the application path itself and that worked perfectly, but it isn't good practice and that's why I'm changing it (or trying to).</p>
  
  <p>I read solutions about creating a download page and then having a table in your DB which holds the links and returns the proper web URL for download but the time constraint I am faced with unfortunately doesn't allow me to develop that.</p>
  
  <p>Assuming I can provide a string with the full filepath to the file like the above, what is the easiest way to just create a link that, when clicked, downloads the document?</p>
  
  <p>Note: I have 0 admin rights in this environment. That really isn't helping me. Let's assume I am given the correct link like above and have the appropriate file access rights and such.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>The above example does work in IE, but not in Firefox and Chrome. IE converts it to a file://servername/... link which does what it's supposed to, but FF and Chrome both actively decided that this is unsafe and have disabled it from their browsers.</p>