I have a section on a website where I display a pdf inside a light box. The recent chrome upgrade has broken this displaying:
Error 349 (net::ERR_RESP
to fix this for any file type with a custom file name remove the (or similar headers)
Response.AppendHeader("Content-Disposition", "inline;");
and add
string fileName = "myfile.xlsx"
return File(fileStream, System.Web.MimeMapping.GetMimeMapping(Path.GetFileName(filePath)), fileName);
you can also use the filepath instead of a stream in the first parameter