Some sites do not allow requesting the same file twice :
I face the previous error when i try to download my pdf in button click event
:
private void AddReportToResponse(LocalReport report )
{
string mimeType;
string encoding;
string extension;
string[] streams = new string[100];
Warning[] warnings = new Warning[100];
Response.Clear();
byte[] pdfStream = report.Render("PDF", "", out mimeType, out encoding, out extension, out streams, out warnings);
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=Application." + extension);
Response.BinaryWrite(pdfStream);
Response.End();
}
Aucun commentaire:
Enregistrer un commentaire