I have a file stored in Azure storage that I need to download from an ASP.NET MVC controller. The code below really works fine.
string fullPath = ConfigurationManager.AppSettings["pdfStorage"].ToString() + fileName ; Response.Redirect(fullPath);
However, the PDF opens on the same page. I want the file to be downloaded through the Save dialog, so the user stays on one page. Before moving on to Azure, I could write
return File(fullPath, "application/pdf", file);
But this does not work with Azure.
source share