Thread was being aborted exception in crystal reports

前端 未结 2 1795
猫巷女王i
猫巷女王i 2021-01-13 08:55

We were getting the Thread was being aborted Exception while exporting a report into PDF.

The below code we were using for export a report into PDF.

         


        
2条回答
  •  走了就别回头了
    2021-01-13 09:45

    The error is thrown because a call to response.End() is made inside of ExportToHttpResponse. Remove your calls to Flush and Close the response and wrap your call to ExportToHttpResponse inside a try/catch block to catch and ignore the System.Threading.ThreadAbortException.

提交回复
热议问题