在将报告导出为 PDF 时,我们收到线程被中止异常。
我们用于将报告导出为 PDF 的以下代码。
Response.Buffer = true;
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
myReportDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, Session["ReportName"].ToString());
Response.Flush();
Response.Close();
Run Code Online (Sandbox Code Playgroud)
请帮助我如何解决此异常。