title: ASP.NET @Url.Action does not generate link for downloading files
body: <p>I have a blog type website (guided by the 3DBuzz video tutorial) with a back-end (for administration purpose) and a front-end. In both back-end and front-end the user should be able to download a file.</p>
  
  <p>The Action for both the front-end and the back-end:</p>
  
  <pre><code>public ActionResult Download(string filename)
      {
          var filepath = System.IO.Path.Combine(Server.MapPath("~/Content/Files/"), filename);
          if (!System.IO.File.Exists(filepath))
              return HttpNotFound();
  
          return File(filepath, MimeMapping.GetMimeMapping(filepath), filename);
      }
  </code></pre>
  
  <p>The front-end view (the @Url.Action is the same in both the front-end and the back-end):</p>
  
  <pre><code>@foreach (var file in Model.Post.Files)
  {
  &lt;a class="list-group-item file-download" href='@Url.Action("Download", "Posts", new { filename = file.FileName } )' id="@file.FileName"&gt;
          &lt;span class="name"&gt;@file.FileName&lt;/span&gt;
  &lt;/a&gt;
   }
  </code></pre>
  
  <p><strong>I do not have any routes configured for this action.</strong>
  The thing is that in the back-end the url is generated and I can download the files</p>
  
  <pre><code>&lt;a class="file-link" href="/admin/Posts/Download?filename=putty.exe"&gt;putty.exe&lt;/a&gt;
  </code></pre>
  
  <p>But when i want to download from the front-end... no link is generated:</p>
  
  <pre><code>&lt;a class="list-group-item file-download" id="putty.exe"&gt;
                      &lt;span class="name"&gt;putty.exe&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>If I create a route in the routeConfig:</p>
  
  <pre><code>routes.MapRoute("DownloadFile", "downloadFile/{filename}", new { controller = "Posts", action = "Download" }, namespaces);
  </code></pre>
  
  <p>the generated link is:</p>
  
  <pre><code>&lt;a class="list-group-item file-download" href="/downloadFile/putty.exe" id="putty.exe"&gt;
             &lt;span class="name"&gt;putty.exe&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>but when I click on this link I get a 404 Not Found</p>