
Aleksandar
Top achievements
Rank 1
Iron
Iron
Aleksandar
asked on 18 Jan 2018, 03:07 PM
Our services are authenticated via an auth cookie that must be sent on every request. How can I attach the cookie to the http requests coming from the WPF report viewer?
3 Answers, 1 is accepted
0
Hi,
I will suggest you to use RestServiceConnectionInfo(string uri, string token) constructor to create the connection string to be used with the REST service. This way you will set up an Authorization Token that would be added automatically to the header with each request to the REST Service. The code can be added in the viewer constructor, after the call to the InitializeComponent() method.
Regards,
Todor
Progress Telerik
I will suggest you to use RestServiceConnectionInfo(string uri, string token) constructor to create the connection string to be used with the REST service. This way you will set up an Authorization Token that would be added automatically to the header with each request to the REST Service. The code can be added in the viewer constructor, after the call to the InitializeComponent() method.
public
ReportViewerWindow1()
{
InitializeComponent();
this
.ReportViewer1.ReportEngineConnection =
new
Telerik.ReportViewer.Common.RestServiceConnectionInfo(
"RestServiceUrlHere"
,
"AuthCookieHere"
).ConnectionString;
}
Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Aleksandar
Top achievements
Rank 1
Iron
Iron
answered on 23 Jan 2018, 09:15 PM
If I'm understanding correctly, this won't actually send a cookie with the request but rather a header. We'd need to extract that header value (presumably the auth cookie string value) and decode/decrypt into an auth cookie on the server, then authorize. If there isn't a simple way to send a cookie, then I think this could work. Thanks, I'll let you know if I run into any issues.
0
Hello Aleksandar,
Yes, this would indeed be a request header.
You cannot send a cookie directly from the WPF Report Viewer.
Regards,
Todor
Progress Telerik
Yes, this would indeed be a request header.
You cannot send a cookie directly from the WPF Report Viewer.
Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items