Blazor WASM + reporting REST Service + TRDP with WebServiceDataSource returns 500 -> 401

1 Answer 38 Views
Report Viewer - HTML5 Rest Service
Frank
Top achievements
Rank 1
Frank asked on 20 Dec 2024, 09:53 PM

I have a .NET 8 Blazor WASM frontend using ReportViewer with a .NET 8 Minimal API with the Telerik Report REST Service. All of this is setup and works fine when the reports (trdp) aren't doing anything complicated, but when I try to use a trdp provided to me that uses some WebServiceDataSource calls that require auth I get a 401. 

These endpoints that are being hit work using the same AuthenticationToken used to hit the telerik endpoints. 

Somehow I need to get the token I am already passing down to also go to those webservicedatasource endpoints. These endpoints are actually in the same project as the telerik report service and work fine on their own with the token

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Dec 2024, 08:50 AM

Hello Frank,

Thank you for the screenshots and the additional information!

Indeed, the authentication token provided to the report viewer is not automatically passed down to the WebServiceDataSource component.

The recommended solution is to create a report parameter whose value will be passed to an Authorization request header in the WebServiceDataSource - Using Parameters with WebServiceDataSource explained with examples - Telerik Reporting. For example:

Please give this approach a try and let me know if you need further assistance.

Regards,
Dimitar
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
Report Viewer - HTML5 Rest Service
Asked by
Frank
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or