I try to download an excel file made by EPPlus.dll
from an asp.net c# web form application. but i get Failed - network error.
It should be noted that mentioned erro
I am exporting html table code which is in string variable HTML
Following Code Working For Me
byte[] myFile = Encoding.ASCII.GetBytes(HTML);
Response.Clear();
Response.Buffer = true;
Response.AddHeader("Content-Type", "application/excel");
Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0};", "BAGrowthReport.xls"));
Response.AddHeader("content-length", myFile.Length.ToString()); //Here is the additional header which is required for Chrome.
Response.BinaryWrite(myFile);
Response.Flush();
Response.Close();