This is a migrated thread and some comments may be shown as answers.

Internal Server Error: Parameter is not valid when export to PDF

8 Answers 200 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phongsathorn
Top achievements
Rank 1
Phongsathorn asked on 20 Aug 2014, 11:47 AM
Dear Telerik team,

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

Sort by
0
Phongsathorn
Top achievements
Rank 1
answered on 20 Aug 2014, 11:50 AM
I'm using Reporting Q2 2014

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>
}
0
Stef
Telerik team
answered on 26 Aug 2014, 06:52 AM
Hi,

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.

 
0
Accepted
Sam
Top achievements
Rank 1
answered on 05 Apr 2015, 04:30 AM
I just wanted to confirm that upgrade from a "Shared" to a "Basic" Azure Websites hosting plan resolved this issue for me.
0
Patrick
Top achievements
Rank 2
answered on 16 May 2015, 05:50 PM

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 :) 

 

0
Erik
Top achievements
Rank 1
Veteran
answered on 12 Jun 2020, 07:47 AM

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:
  1. Unsure if "Azure Web Role" is still valid with the current Azure plans
  2. 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

0
Katia
Telerik team
answered on 17 Jun 2020, 06:47 AM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ivan Seselj
Top achievements
Rank 1
answered on 21 Sep 2020, 02:57 AM

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?

0
Neli
Telerik team
answered on 24 Sep 2020, 06:26 AM

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).

Tags
General Discussions
Asked by
Phongsathorn
Top achievements
Rank 1
Answers by
Phongsathorn
Top achievements
Rank 1
Stef
Telerik team
Sam
Top achievements
Rank 1
Patrick
Top achievements
Rank 2
Erik
Top achievements
Rank 1
Veteran
Katia
Telerik team
Ivan Seselj
Top achievements
Rank 1
Neli
Telerik team
Share this question
or