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

Reporting ASP.Net Core REST Service Configuration

3 Answers 287 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Georgios
Top achievements
Rank 1
Georgios asked on 09 Feb 2017, 08:12 AM

Dear support team,

We have implemented an ASP.NET Core REST Service controller which inherits from Telerik.Reporting.Services.AspNetCore.ReportsControllerBase. In addition, we have designed a report that consist of an ObjectDataSource, which is expected to call a function from a particular class, in order to get the report data.

When HTML 5 Report Viewer requests for the report from the REST service, we get the following error:

An error has occurred while processing Report 'ReportName':
The assembly "MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" is not
permitted to be used by an ObjectDataSource component. Please include it in an AssemblyReferences element in the
Telerik.Reporting configuration section of your application configuration file.

According to other posts, this error most likely occurs because the assembly name has not been added to the 'Telerik.Reporting/AssemblyReferences'  section of the web.config of the project. In our case though, we don't have a web.config file since we are using ASP.NET Core.

Could you please advice how we could overcome this issue?

 

Kind regards,

GD

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Top achievements
Rank 1
answered on 09 Feb 2017, 10:45 AM

HI,

Just a thought whilst you are waiting for the support team / experts (l have not used objectdatasource). Asp.net core uses the app.config file, l know this as it got me when l needed to add a reference to an assembly containing custom functions for the reports.
Also, if you are using IIS for hosting the web.config file still gets used by IIS.

My entry in the app.config file:

<Telerik.Reporting>
<AssemblyReferences>
<add name="MyTestProject.Telerik.CustomFunctions" version="1.0.0.0" culture="neutral" publicKeyToken="null" />
</AssemblyReferences>
</Telerik.Reporting>

Paul

0
Accepted
Stef
Telerik team
answered on 09 Feb 2017, 03:20 PM
Hello,

That is correct.
You can add an app.config file at root level and it will be used by the Reporting engine to read connection strings and other settings not applicable in json files.

Regards,
Stef
Telerik by Progress
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
Georgios
Top achievements
Rank 1
answered on 13 Feb 2017, 06:37 AM

Thank you Paul & Stef, I applied what you suggested and it worked!!!:)

Tags
General Discussions
Asked by
Georgios
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Stef
Telerik team
Georgios
Top achievements
Rank 1
Share this question
or