I am trying to create an application that will display images that are stored locally on the webserver. Here is what I have in my view, note that \"entry\" are absolute addresse
The above code was useful for me, with a change like this
 System.Web.UI.Page page = new System.Web.UI.Page();
 string filePath = page.Server.MapPath("~/Log/" + fileName);
        if (!filePath.StartsWith(filePath))
        {
            throw new HttpException(403, "Forbidden");
        }
        return File(filePath, "Content-Disposition", "attachment;filename=TableImportLog.csv");
}
the file thrown to the user is with file name like this "attachment;filename=TableImportLog.csv", but i want the file name as "TableErrorLog.csv" need help for the same!