Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReportViewer RDLC - Azure Websites Error 80004005

I hope someone can help me with this. It's killing me. I've spent hours over days on it and my client is becoming increasingly frustrated. :(

I am hosting on Azure Websites and SQL Azure. I am using v.10 of the Reporting assemblies. Everything works perfectly fine outside of Azure (localhost, no problems)

I have a ReportViewer in ASP.NET within a user control. The ReportViewer and RDLC are working perfectly for display and export to Excel/Word, however I am having issues with PDF export and printing within IE.

When printing:

Prompt: An error occurred during printing. (0x80004005)

and

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Wed, 24 Apr 2013 03:18:56 UTC

Message: Unspecified error. Line: 1058 Char: 13 Code: 0 URI: http://XXXXXXX.azurewebsites.net/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=10.0.40219.329&Name=ViewerScript

Line 1058 of that .axd is:

printObj.Print(printInfo.PrintRequestPath, printInfo.PrintRequestQuery, printInfo.ReportDisplayName);

When exporting to PDF:

Server Error in '/' Application.

Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Parameter is not valid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: Parameter is not valid.]
System.Drawing.Graphics.GetHdc() +1143305
Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +57
Microsoft.ReportingServices.Rendering.RichText.TextBox.MeasureFullHeight(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Single& contentHeight) +500
Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +381
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable1 sourceWidth) +695
Microsoft.ReportingServices.Rendering.HPBProcessing.RowInfo.CalculateVerticalLastDetailCell(PageContext context, Boolean firstTouch, Boolean delayCalc) +411
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailCell(Tablix tablix, TablixMember colMemberParent, Int32 colGridIndex, RowInfo rowInfo, PageContext pageContext) +822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List
1 detailCellsState, PageContext pageContext) +108
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List1 detailCellsState, PageContext pageContext) +869
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailRow(Tablix tablix, TablixMember rowMemberParent, Int32 parentRowIndex, Int32 parentColIndex, PageContext pageContext) +292
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +137
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +2822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +2822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +2822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixRows(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, List
1& pageStructMemberCell, Boolean ignoreTotals, Boolean& finishLevel, Boolean parentHasFooters, CreateItemsContext createItems, Double startInTablix, Double endInTablix, PageContext pageContext) +2310 Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixItems(Tablix tablix, PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix) +113
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateVertically(PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix, Double topInParentSystem) +286
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +646
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable1 sourceWidth) +695
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineContentVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List
1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Boolean resolveState, Boolean resolveItem) +273 Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +145
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable1 sourceWidth) +695
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +53
Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 page, Int32 totalPages) +659
Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.NextPage() +52 Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.Init(Report report, PaginationSettings pagination, CreateAndRegisterStream createAndRegisterStream, Hashtable& renderProperties) +348
Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) +141
Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) +61

[LocalProcessingException: An error occurred during local report processing.]
Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +333
Microsoft.Reporting.WebForms.LocalModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileNameExtension) +215
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +154
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +216
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

Thank you.

like image 686
trnelson Avatar asked Apr 24 '13 04:04

trnelson


2 Answers

I got same issue today when I was publishing to Azure Web Site(App). Problem was solved by migrating site from FREE to BASIC app service plan tier.

like image 57
marc Avatar answered Oct 15 '22 20:10

marc


PDF generation is actually not supported in the security configuration on WAWS, in this case you should use either a WebRole or a Web Server on a Virtual Machine. Thanks! Nir (WAWS team)

like image 3
Nir Mashkowski Avatar answered Oct 15 '22 20:10

Nir Mashkowski