RadzenSSRSViewer - Pass credentials

Hi,
I want to ask how to pass credentials to SSRS report when using .NET 5 and Radzen Blazor Web Assembly using free blazor component SSRSViewer to avoid prompting browser for credentials.

I didn't found thread which can help me. I found some where developers using generated ReportController.cs but i don't have this file and didn't find how to implement it.

Thank you so much

image

The ReportController class is generated by Radzen when you create a new Radzen Blazor application. You can copy it to your application in the Controllers directory and then set the UseProxy property of the RadzenSSRSViewer to true. Then you should follow the other forum threads that show how to set credentials via the ReportController. A have also attached the ReportController to this reply.
ReportController.cs.zip (2.5 KB)

1 Like

Thank you so much for quick reply, also thanks for the controller file.

I just want to ask where the controller should be properly?

because in my solution I have Razor pages using Radzen Compoments and from those pages I am calling API which is my another project in NET 5 (AspNetCore MVC API), so in WEB part I have just Pages and API middlewares which calls my API project and retrieve data from it.

So that's why am I asking where I should put it because in WEB part where Radzen is I don't have controllers at all or even Controllers directory.

Maybe I made it badly from beginning

Thank you for your help, I appriciate your tips and help

The report viewer will look for the ReportController in the same application by default. You can however use the LocalServer property to specify a different application path. Here is the code which determines the path.

In short you can copy the controller to the app that already has controllers in it and set the LocalServer property of the report viewer to it. Otherwise add it to the Blazor app and enable controllers in its Startup.

1 Like

Thank you again,

I will try it in case of another questions i will continue in this thread

I really appreciate your attention and quick reply for any query.

Tried with attached Report controller. Set Proxy Property to true of RadzenSSRSViewer.
Getting below error.

I could resolve above error. but getting entire page on reportViewer with error


Can you please advise ,how can I resolve this.UAT testing is on hold due to this issue :slightly_frowning_face:
I am eagerly waiting for your reply.
Thank you

The problem doesn't seem related to the Radzen.Blazor components. It is an exception thrown by reporting services. You can follow the instructions in the exception message itself to troubleshoot further. And you can always disable the proxy feature and embed the report as it is.