79467855

Date: 2025-02-25 21:02:34
Score: 3
Natty:
Report link

I have the same Issue. Adding the line Response.Close() works for me.

Response.BufferOutput = false;
  Response.Clear();
  Response.ContentType = "text/csv";
  Response.AppendHeader("Content-Disposition", "attachment; filename=test.csv");
  Response.TransmitFile(PathFile);
  Response.Flush();
  Response.SuppressContent = false;
  Response.Close();
  HttpContext.Current.ApplicationInstance.CompleteRequest();
Reasons:
  • Blacklisted phrase (1): I have the same Issue
  • Whitelisted phrase (-1): works for me
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same Issue
  • Low reputation (1):
Posted by: Fernando Ramirez