There are many threads on here about the reporting + azure = outofmemory issues but none seem to have a solution.
Our situation, we have been using our site for a few years now and it's worked fine until we deployed it to Windows Azure Websites.
Each time we generate a pdf report (approx 30-40kb) we get the following exception.
Out of memory. STACK TRACE: at System.Drawing.Font.ToLogFont(Object logFont) at System.Drawing.Font.ToHfont() at Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC) at Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont) at Telerik.Reporting.Pdf.PdfFontDictionary..ctor(PdfDocument document, PdfFont drawingFont) at Telerik.Reporting.Pdf.PdfFontType0Dictionary..ctor(PdfDocument document, PdfFont font) at Telerik.Reporting.Pdf.PdfPageDictionary.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) at Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, Brush brush, Int32 renderMode) at Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, Brush brush, Int32 renderMode) at Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont font, Brush brush, RectangleF rect, Boolean rightToLeft) at Telerik.Reporting.Pdf.Drawing.PdfGraphics.DrawString(String s, Font font, Brush brush, RectangleF rect, StringFormat format) at Telerik.Reporting.ImageRendering.CanvasPdf.DrawStringMultiline(String s, Font font, Brush brush, RectangleF rect, Single lineHeight, StringFormat format) at Telerik.Reporting.ImageRendering.DocumentBase.WriteText(String text, RectangleF bounds, Single lineHeight, IStyle style, StringFormat format) at Telerik.Reporting.Writing.TextBoxWriter.Write(DocumentWriter writer, ProcessingElement element, ElementPageInfo pageInfo, IPageClip pageClip) at Telerik.Reporting.Writing.ProcessingElementWriter.StartWrite(ProcessingElement element, ElementPageInfo pageInfo, DocumentWriter writer) at Telerik.Reporting.Processing.ProcessingElementVisitor.Visit(ProcessingElement element) at Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler) at Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler) at Telerik.Reporting.Paging.PageComposition.SendPhysicalPages(Boolean lastPage) at Telerik.Reporting.Paging.PageComposition.PageOverride() at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo)
We have purchased priority support with Azure to help us with this issue, noting that it hasn't been happening on our previous host.
They concluded that this was a telerik issue, since the azure sites run in Full Trust by default.
We are using .NET4.5 framework with Telerik Reporting Q3 2011 SP1 (5.3.12.119)
Has this issue been identified and is there now a solution?
15 Answers, 1 is accepted

This is a known issue with Windows Azure Shared Websites related to their GDI+ support, required for any reporting solution. Our demo at http://telerikreporting.cloudapp.net/ runs as expected, so our suggestions is to use Azure Cloud Service instead of Web Sites.
You may find useful the Running Telerik Reports in the cloud with Windows Azure Part 2 help article.
Let us know if you have any further questions.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

However, moving to a service is not an option for us at this point..
Are there any work around or bandaids to cure this for now on the azure websites certain fonts?, removing images?
The report is a single page report (invoice) and we don't use a viewer, just render directly to pdf and save to a file.
The size of the report is small and we don't generate many of them.
We've tried changing the fonts to Arial but that doesn't fix it.
Could it be that the Telerik reporting control could have a memory leak and it's not destroying all handles?
Can you provide some other alternatives to working around this other than running it as a service please.

The issue with Windows Azure Shared Websites is that they do not support GDI+. Telerik Reporting internally works with GDI+ to perform all the rendering for some formats and part of the rendering for other formats. There is no way to for Telerik Reporting to stop working with GDI+. So the only solution in your case is the proposed in the previous post.
Regards,
IvanY
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Thanks
Steve

This is a limitation of Azure Web Sites, which is commonly discussed in forums as this.
Currently the solution is to render reports out of Azure Web Sites.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.



Thank you for your update.
We are going to test if the fix allows the generation of PDF/Excel documents by applications hosted in Azure Web Sites. Any details where (region) and how (plan in Azure) you deploy and if you tested any reporting solutions will be appreciated.
Keep in mind the fix from Microsoft may not be applied yet to all third-party providers.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Dan

Thank you for the provided information.
We will perform several tests in Azure WebSites and will update this forum thread with our findings.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

We can confirm the export into PDF and Excel, and the print operation respectively, via Telerik Reporting libraries are available in Azure WebSites Basic and Standard modes.
Using Azure WebSites in Free and Shared mode still results in an error on exporting into PDF and on printing.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Hi , I am using telerik html5 report viewer . My application running fine at local server and also at smarter asp. But when I deploy my application at Azure as a cloud service I am facing an error..
{"message":"","exceptionMessage":"Report instance with ID '062519-c7a8' not found.","exceptionType":"Telerik.Reporting.Services.Engine.InvalidInstanceException","stackTrace":" at Telerik.Reporting.Services.Engine.ReportEngine.GetDocument(String clientID, String instanceID, String documentID)\r\n at Telerik.Reporting.Services.WebApi.ReportsControllerBase.GetDocument(String clientID, String instanceID, String documentID)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
Is someone has any idea about the issue. Please provide some work around to get out of it if possible.
Thank You .
​

To deploy the Reporting REST service in Azure, you will have to use an IStorage implementation suitable for web farms.
Reports can be also directly rendered in a selected format through a ReportProcessor instance - Exporting Report Programmatically.
The known issues and scenarios with Azure are listed in the following articles:
- GDI+ error or OutOfMemoryException on exporting or printing Telerik report from Azure WebSites (supported Azure plans, and required settings. This article elaborates on the options to use reporting solutions (in general) rendering documents via GDI+ methods in Azure;
- 'Operation could destabilize the runtime' exception occurs when running on Windows Azure (deployment hint for publishing WebAPI based services);
- WebRole starts cycling after deploying to Windows Azure (deployment hint);
Let us know if you have any further questions.
Regards,
Stef
Telerik

Hi,
I have my web application deployed to windows azure website which is under standard pricing tier. Trying to load a report with lot of images. it ran into error saying request timed out. Then after increasing http runtime to 6 mins , report viewer is neither showing report contents nor showing any errors. It just shows "0 pages loaded so far" and does nothing. I waited for around 15 mins but report was not loaded.

About the issue on displaying the report, please test if it is reproducible only in IE browser. If yes, most probably the report is designed to use a Table item, which is rendered on a single continuous page in Interactive Preview. Setting the viewer to display reports in Print preview should resolve the issue.
For more details, please check Browsers and Limitations (HTML Rendering).
In case the issue is not related, please get the exception stack trace and test to reproduce the problem locally. We can also perform tests if the issue is reproducible locally by sending us the demo project.
Regards,
Stef
Telerik