I always got error "Internal Server Error: Parameter is not valid." when I export report to PDF from Html5 report viewer.
This issue happen when I upload project to online server Windows Azure. But it is not happen on local or test environment.
Error message is in attached image.
Thanks.
8 Answers, 1 is accepted
This is scripts:
<link href="~/Content/font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="~/ReportViewer/styles/telerikReportViewer-8.1.14.804.css" rel="stylesheet" />
}
@{
var typeReportSource = new UriReportSource() { Uri = "../Reports/Performance/MotorcycleSales.trdx" };
typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("FROMDATE", DateTime.Now));
typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("TODATE", DateTime.Now));
}
<div>
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl("/api/reports/")
.TemplateUrl("../ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html")
.ReportSource(typeReportSource)
.ViewMode(ViewModes.PRINT_PREVIEW)
.ScaleMode(ScaleModes.SPECIFIC)
.Scale(1.0)
.PersistSession(false)
)
</div>
@section scripts
{
<script src="../ReportViewer/js/telerikReportViewer-8.1.14.804.js"></script>
}
Please check if you hosting plan corresponds to the described in the OutOfMemoryException on exporting or printing Telerik report from Azure WebSites KB article.
I hope the information helps you.
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.
I had this problem and managed to solve it by moving from a Free pricing Azure web app to a Standard pricing Azure web app. I then had a separate problem (error in GDI+) when exporting to RTF which I managed to solve by adding the section for RTF rendering extensions to my Web.config file, as per:
http://www.telerik.com/support/kb/reporting/details/outofmemoryexception-on-exporting-or-printing-telerik-report-from-azure-websites
Hope this helps anyone who has a similar problem :)
Can somebody pls. provide an update to this?
These posts are all 5+ years old, and I'm sure things have changed substantially on Azure's side.
Here's the problem I'm experiencing (my Telerik Report REST Service is hosted on Azure, Shared Infrastructure/D1 plan)
- When trying to export a report in PDF or Excel format, I get "Internal Server Error. Parameter is not valid."
- W.r.t. the solutions presented here:
- Unsure if "Azure Web Role" is still valid with the current Azure plans
- If I add the Extensions that turn off the use of Metafile to Web.config, my reports stop loading altogether (indefinitely stuck on "Loading...")
Any help would be greatly appreciated, as I need to get the export functionality working for my customer.
Erik
Hi Erik,
From our experience, the most common reason for "Internal Server Error - Parameter is Not Valid" error is the specifics of the Azure plan. The Reporting engine uses the GDI+ library, which is currently available only in Basic and higher App Service plans.
If your plan satisfies those requirements you can test restarting the Azure Reporting REST service.
You can also check the response to the failing request for the Stack Trace of the Internal Server Error. You can use the browser Developers tools (press F12), or Fiddler. This might help to determine the exact cause of the issue.
Regards,
Katia
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
We experience similar issue, but it happens only after all GDI resources available are used. It means that when we just start an application the export works, but after a while it stops working. The error is the same "Internal Server Error - Parameter is Not Valid". Our Azure app plan is above Basic.
Is there another way to export reports to pdf without using unmanaged resources?
Hello Ivan,
I would suggest to check the approaches from Unable to print reports from Azure environment KB article or OutOfMemoryException on exporting or printing Telerik report from Azure WebSites KB article.
Let us know if the issue is resolved.
Regards,
Neli
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).