Ported old Reporting project from mix of .net Core and Standard to .Net 6.0 and getting errors: Extension not supported, or Cannot access the Reporting REST service.

1 Answer 186 Views
Report Viewer - HTML5
Top achievements
Rank 1
Alix asked on 20 Mar 2023, 11:58 PM

I just inherited an old reporting website that I am trying to update. I didn't write it, but needed to convert to .net 6.0 for API compatibility. I was getting an error "Cannot access the Reporting REST service." but followed this guide https://www.telerik.com/blogs/embedding-beautiful-reporting-aspnet-core-web-applications and adding the ".AddNewtonsoftJson();" part now makes it so that I instead get an Exception "The extension is not supported."
   at Telerik.Reporting.Services.Engine.ResourcesEngine.GetMimeType(String filename)
   at Telerik.Reporting.Services.Engine.ResourcesEngine.GetResource(String folder, String name, String& mimeType, Type type)
   at Telerik.Reporting.Services.AspNetCore.ReportsControllerBase.GetResourceCore(String folder, String resourceName, Type type)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<<InvokeActionMethodAsync>g__Logged|12_1>d.MoveNext()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<<InvokeNextActionFilterAsync>g__Awaited|10_0>d.MoveNext()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<<InvokeNextExceptionFilterAsync>g__Awaited|26_0>d.MoveNext()

I have trdp files. I updated the path so the IReportServiceConfiguration points to the correct directory. I set a breakpoint in my ReportController ctor and it gets hit when I try to load the report page, but then I either get the error "Cannot access the Reporting REST service. (serviceUrl = '/api/reports/'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)" or the one about the file extension. I've followed all the guides for enabled CORS. Do I have to do any kind of MIME configuration to support the TRDP files?


Please advise. Thank you

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 22 Mar 2023, 01:08 PM

Hello Alix,

Thank you for the provided information!

Usually, such a problem occurs when there is a mismatch between the versions of the Telerik Reporting references in the project(s). 

Please make sure that the same version is used for all Telerik Reporting references including the scripts, templates, stylesheets, etc. in all of the projects where you are using Telerik Reporting.

My recommendation would be to use the Telerik Reporting NuGet packages, if you are not doing so already, because it is the easiest way to keep a .NET project up to date with Telerik Reporting. If you have any Telerik Reporting assemblies referenced in the project, please remove them and add their corresponding NuGet package. When the nuget packages are used, usually all that needs to change after an update is a few references to the resources of the Report Viewer/Web Report Designer. Though, please keep in mind that you need to set up the private Telerik feed beforehand - Adding the Private Telerik NuGet Feed to Visual Studio through the NuGet Package Manager or NuGet CLI - Telerik Reporting.

If the issue persists after making sure that there are no old references/version mismatches of the Telerik Reporting references, please send me a sample project where the problem is reproducible or the following logs:

I will be looking forward to receiving an update from you.

Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Report Viewer - HTML5
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question