title: ASP.NET MVC Redirecting to PDF but getting 404 on Development server
body: <p>So my client gave me a MVC site that was created and set up my another vendor. I have never worked with MVC until now so I am learning as I go. I was given a small up date to the site where the client needs a link to PDF, which will then open in the browser window. I added the PDF and added a new route and action in the Controller. The following is the code I added:</p>
  
  <p><strong>Home Controller Code</strong></p>
  
  <pre><code>public ActionResult ViewPDF()
  {
      return Redirect("Assets/PDF/myPDF.pdf");
  }
  </code></pre>
  
  <p><strong>Route Code</strong></p>
  
  <pre><code>routes.MapRoutesLowercase(
      "Home-ViewPDF",
      "myPdf.pdf",
      new { controller = "Home", action = "ViewPDF" }
  );
  </code></pre>
  
  <p><strong>HTML Code</strong></p>
  
  <pre><code>&lt;a href="&lt;% Url.Action("ViewPDF", "Home") %&gt;"&gt;&lt;/a&gt;"
  </code></pre>
  
  <p>Now when I test locally the link works and all is good.
  When I promote to my Development server I click the link and I get "The page cannot be found". But I know the file is on the server be cause if I type the path in the pdf comes up with no problem. </p>
  
  <p>I have looked every where but cannot find anything online that comes close to what I am looking for, as far as I know that is. </p>
  
  <p>I should note that before I was using Redirect in the Controller I was using a FileResult and returning the File with type application/PDF. However while I was debugging I tried the current method and like I said it worked locally but not on DEV.</p>
  
  <p>Any help would be extremely helpful!!
  Thanks!  </p>