Server report will not render produces RPL stream error
When I render a local report it works fine, but when I point this control to my SSRS 2017 it returns an error
An error occurred during client rendering. Unsupported RPL steam version detected: 61.34.1042443877. Expected version: 10.6
When I run against this same reporting server using a .NET Framework winform app and MS's latest report viewer control it renders correctly.
We use a custom SSRS Security extension and windows forms authentication
To set the authentication I am using the standard viewer.ServerReport.ReportServerCredentials.NetworkCredentials = CredentialCache.DefaultNetowrkCredentials;
and logging in with viewer.ServerReport.ReportServerCredentials.SetFormsCredentials(null,"user","password","");
This seems to work fine, everything seems ok until you perform a RefreshReport then the RPL error occurrs
Can you check if the report works with your extension disabled?
The version number 61.34.1042443877 from the error message looks out of place. When converted byte-by-byte back to ASCII, it renders as ="en">, which looks more like a part of <html lang="en"> HTML header than a proper SSRS response.
Check your server logs and/or sniff the communication to see if your authentication and authorization is correct.
Yes you are correct, the response coming back is starting with <html lang="en"> this response is the forms authentication page which should not be coming back if forms authentication sent the credentials and caches them correctly.
Using this same code against the same server with MS's packaged control authorization happens correctly and the report renders, it appears that something is not working on the credentials end in your code in relation to using the following code
` reportViewer.ProcessingMode = ProcessingMode.Remote; reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials = CredentialCache.DefaultNetworkCredentials; reportViewer.ServerReport.ReportServerCredentials.SetFormsCredentials(null, @"user", "password", ""); reportViewer.ServerReport.ReportServerUrl = new Uri("https://myreportserver/ReportServer"); reportViewer.ServerReport.ReportPath = "/testreport/test";
reportViewer.RefreshReport();
`
because it's acting like credentials were not passed in
Consider setting reportViewer.ReportServerCredentials.NetworkCredentials to proper instance of NetworkCredential as in example provided in readme of this repo and in WinFormsServer sample project. Values provided in SetFormsCredentials are not really used due to switch from WebClient to HttpClient for communication.
There is no RPL error after doing that but now it's giving me an HTTP status code of 302 and redirecting me to the log on page as the response, it's almost like it's not sending it as basic authentication when working with forms authentication?
System.Net.WebException: 'The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportExecution2005.asmx">here</a>.</h2>
</body></html>
--.
Disregard previous comment - it's for basic auth only. You should definitely use SetFormsCredentials if you need forms authentication.
Can you trace at which point in report viewer code you get such response from SSRS? As far as I can tell, there should be a call to server-side LogonUser method which provides a cookie for subsequent requests. It looks as if the cookie is not sent back on next request, but I have no way to test it on my instance of SSRS.
There indeed is an issue with a missing RSAuthenticationHeader header and forms authenticaion cookie. Without a way to test it, all I can do is to point you (or anyone else using custom authentication) to SoapReportExecutionService and commented out methods GetWebRequest and GetWebResponse from original RV. You can try to re-implement them in a IClientMessageInspector placeholder I have provided in today's commit.
Hi, I am wondering if anyone can assist... I am attempting to using the ServerReport option with a .net 6 Worker Service to render to PDF. I am receiving the following error below.
"The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '"
I really appreciate if someone can assist.
Most likely you get an error page from web server instead of a proper RS response. Inspect the response body and server logs to see what's wrong.
I got it, it was my mistake, in SSRS 2019 the url is like "http://server/reports/report", when I view the report in the browser. I added the "/report" to the url, once I corrected the the url, it started working. Sorry for the comments, I appreciate your response.