Pending Review
Last Updated: 18 Nov 2024 19:00 by Sandy
Sandy
Created on: 18 Nov 2024 19:00
Type: Bug Report
0
ReportsControllerBase CreateInstance returns an incorrectly formated JSON payload

The ReportsControllerBase is returning a JSON payload of { "InstanceId": "xxxx" } instead of { "instanceId": "xxxx" } that the Html5 ReportViewer is expecting. I believe the CreateInstance method should be using CreateJsonResponse instead of CreateResponse. I overrode the ReportsControllerBase.CreateInstance like the following to get it working again:


response = base.CreateInstance(clientId, reportSource);

// This is to work around a bug in telerik reporting.
BusinessLogicResponse v = BusinessLogicResponse.CreateInstance(HttpStatusCode.Created, ((ObjectResult)response).Value);
response = base.CreateJsonResponse(v);

0 comments