I recently upgraded by ASP.Core beta web project to an ASP.NET Core 2.0 application with an ASP.NET Core 2.0 API behind it.
Before the upgrade, my Telerik reports ran fine.
Now, the HTML5 viewer appears, and throws the following error:
"Error registering the viewer with the service. An error has occurred. The type initializer for 'Lock' threw an exception."
In Chrome developer's console, the following javascript error shows:
1#:1 Uncaught (in promise) Invalid cliendID
Promise.then (async)
refreshReport @ telerikReportViewer-12.0.18.227.js:1442
start @ telerikReportViewer-12.0.18.227.js:5417
I have followed the exact steps from here to support ASP.NET Core 2.0 apps:
https://docs.telerik.com/reporting/html5-report-viewer-asp-net-core-2#html5-report-viewer-in-asp-net-core-2
Any ideas what the error means and how to fix it?
Thanks!
5 Answers, 1 is accepted
I solved this:
Telerik Reporting can be used with ASP.NET Core 2.0 projects, but must target the regular .NET Framework, not .NET Core Framework.
I rebuilt my new project to target .NET 461 and it works great.
In order to use Telerik Reporting in a .NET Core project the latter must target the full .NET Framework. You can find more information in the reply to the support ticket you opened on the topic.
Regards,
Todor
Progress Telerik
In our R1 2019 release, we introduced a .NET Core support for projects. Now you will be able to render reports from pure .NET Core applications. Please refer to .NET Core support help article. Also you can find a complete step-by-step guide on how to host Telerik Reporting REST Service and add HTML5 Report Viewer in an ASP.NET Core 2.1+ web applications: Manual Setup of HTML5 Report Viewer in an ASP.NET Core 2+ application.
To design reports, we strongly recommend using the Standalone Report Designer. For more details, please check Guidance for using reports from an existing .NET Framework 4+ report library in a .NET Core application.
Our product now ships with an ASP.NET Core example designed to help you to get started using Telerik Reporting in a .NET Core environment. You could found it in Telerik Reporting installation folder, i.e. C:\Program Files (x86)\Progress\Telerik Reporting <VERSION>\Examples\CSharp|VB (Asp.NetCoreDemo).
An excellent blog post that you might find interesting is Using Telerik Reporting in .NET Core Applications.
I hope that this information would help you to get started.
Best Regards,
Silviya
Progress Telerik