SSRSViewer

Is there anyway to pass username and password credentials with the SSRSViewer?

Hi @LordRob,

If you enable server-project for your application

and check Use Proxy for the SSRSViewer

Radzen will generate ReportController class in the server project where you can control which user what can request

Best Regards,
Vladimir

I am very new to this so please excuse my ignorance.

Can something like this be used to authenticate to the SQL Report Server?

public partial class ReportController
{
    partial void OnReportRequest(ref HttpRequestMessage requestMessage)
    {                   
        var byteArray = Encoding.ASCII.GetBytes("username:password");
        requestMessage.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));         
    }
}

Hi,

Yep, that’s the idea of our OnReportRequest method!

Best Regards,
Vladimir

Hi,

I have had no sucess using the OnReportRequest method to authenticate to the report server.

Please would you consider adding fields for username, password and domain to the SSRSViewer … that if set will authenticate to the report server.

Also, I have an issue when running reports. My report runs the first time ... but if I change the date and try and run it again I get an error as per the picture attached..

Hi,

Do you need to authenticate against a domain? The code you initially provided will only work only HTTP Basic authentication. We have an idea how to support domain authentication but can’t easily test it at our side. Are you up for trying a test build? If yes please drop us a line at info@radzen.com.

In addition you could send us your report definition at that email address so we can investigate the runtime error that occurs when you change the date.

Best,
Atanas