3 Answers, 1 is accepted
You can set the authentication token through the report viewer options.
HTML5 Report Viewer:
<script type=
"text/javascript"
>
$(document).ready(
function
() {
$(
"#reportViewer1"
)
.telerik_ReportViewer({
serviceUrl:
"api/reports/"
,
authenticationToken:
"myAuthToken"
,
...
MVC Report Viewer:
@(Html.TelerikReporting().ReportViewer()
.Id(
"reportViewer1"
)
.ServiceUrl(Url.Content(
"~/api/reports/"
))
.AuthenticationToken(
"myAuthToken"
)
...
HTML5 Report Viewer for WebForms:
this
.reportViewer1.AuthenticationToken =
"myAuthToken"
;
Regards,
Nasko
Telerik
Hi.
We did as you described. And it sends token for the most resources, but some how does not for the follwoing url:
GET /api/reports/clients/173901-cdb6/instances/173902-9976/documents/173902-d1da173902-1f2a/resources/expand.png/
I assume it's expand icon for a cross tab component.
Is it a bug ? We need to identify users in order to assign appropriate connection string. (Different users work with different databases)
Problem is that this reqeust hits ReportController in the backend but we cannot create ReportServiceConfiguration in the ReportController constructor.
var configSectionConfigurationInstance =
new Telerik.Reporting.Services.ConfigSectionReportServiceConfiguration
{
HostAppId = "MyApp",
ReportResolver = new CustomReportResolver(),
Storage = new Telerik.Reporting.Cache.MsSqlServerStorage(currentUser.Client.DatabaseConnection)
};
this.ReportServiceConfiguration = configSectionConfigurationInstance;
Request has no token as theresult we don't knwo current user and cannot set the connection string
Please check my reply in your forum thread on the same question.
We will appreciate it to continue the discussion in one of both threads in order to keep a better track on the exchanged information.
Thank you for your understanding.
Regards,
Stef
Telerik by Progress