You really don't need a controller action for this. You could simply:
<a href="http://www.blabla.com/mypdffile.pdf">Open mypdffile.pdf</a>
Of course, if you want to hide this address from the user, you can use WebClient to get it on the server:
public ActionResult GetPDF()
{
using (var client = new WebClient())
{
var buffer = client.DownloadData("http://www.blabla.com/mypdffile.pdf");
return File(buffer, "application/pdf", "mypdffile.pdf");
}
}
And in your opinion:
<%= Html.ActionLink("Download PDF", "GetPDF") %>
source
share