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

Error when using ASP.NET Core 2.0 app

5 Answers 326 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 15 Mar 2018, 05:14 PM

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

Sort by
0
Dan
Top achievements
Rank 1
answered on 15 Mar 2018, 06:50 PM

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.

0
ahmed
Top achievements
Rank 1
answered on 19 Aug 2018, 07:55 PM
isn't there any way to keep targeting to asp.net core 2 and get the reports working ? this is very disappointing to change your project to fit to the reports of Telerik !!
0
Todor
Telerik team
answered on 22 Aug 2018, 01:39 PM
Hi ahmed,

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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Karl
Top achievements
Rank 1
answered on 30 Apr 2019, 01:14 PM
Has this issue been solved in newer Telerik versions?
0
Silviya
Telerik team
answered on 02 May 2019, 06:25 AM
Hi Karl,

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. F
or 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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Dan
Top achievements
Rank 1
ahmed
Top achievements
Rank 1
Todor
Telerik team
Karl
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or