we using following code for exporting report to .pdf format:
On our development server we can't reproduce this issue, but on production server we have issue when we do this.using (StiReport report = new StiReport())
{
report.Load(HttpContext.Current.Server.MapPath("../Reports/CourseTopics.mrt"));
report.Dictionary.Variables["idcourse"].ValueObject = nIDcourse;
report.Dictionary.Variables["academicyear"].ValueObject = (oParams.Length == 1 ? oParams[0] : 2010);
report.Render(false);
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this.Page, report, true);
}
On client side in web application it seams exporting work OK, but Event viewer constantly get below warning in application log when our users exporting report in .pdf format:
Do you know solution for this issue?Event code: 3005
Event message: An unhandled exception has occurred.
Exception information:
Exception type: HttpException
Exception message: The remote host closed the connection. The error code is 0x80070040.
Thread information:
Thread ID: 5
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush)
at System.Web.HttpResponse.Flush()
at Stimulsoft.Report.Web.StiReportResponse.ResponseAs(Page page, MemoryStream stream, String contentType, String fileName, Boolean openDialog)
at Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, Boolean openDialog, StiPdfExportSettings settings)
at Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFonts, Boolean standardPdfFonts, Boolean exportRtfTextAsImage, Boolean openDialog, String passwordUser, String passwordOwner, StiUserAccessPrivileges userAccessPrivileges, StiPdfEncryptionKeyLength keyLength, Boolean useUnicode)
at Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFonts, Boolean standardPdfFonts, Boolean exportRtfTextAsImage, Boolean openDialog, String passwordUser, String passwordOwner, StiUserAccessPrivileges userAccessPrivileges, StiPdfEncryptionKeyLength keyLength)
at Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFont, Boolean standardPdfFonts, Boolean openDialog, String passwordUser, String passwordOwner, StiUserAccessPrivileges userAccessPrivileges)
at Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFonts, Boolean standardPdfFonts, Boolean openDialog)
at Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, Boolean openDialog)
at Lumens.App.AppLayer.GetTestPdfReport(Int32 nIDtest, Int32 nReporttype, Page CurrentPage, Object[] oParams)
at TestsControl.ShowReport(Object sender, DirectEventArgs args)
at Ext.Net.ComponentDirectEvent.OnEvent(DirectEventArgs e)
at Ext.Net.Observable.FireAsyncEvent(String eventName, ParameterCollection extraParams)
at Ext.Net.ResourceManager.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Best regards,
Sasa