Hi,
Following the directions at http://www.telerik.com/help/reporting/html5-report-viewer-embedding.html, the report border shows but the browser reports Method Not Allow for the page http://localhost:57012/api/reports/clients/231714-9deb/parameters.
When I browse to the page I get:
<Error>
<Message>
The requested resource does not support http method 'GET'.
</Message>
</Error>
I have checked the posts:
- http://www.telerik.com/forums/the-webapi-controller-action-for-clients-object-20object-parameters-404-(not-found)
and
- http://www.telerik.com/forums/reporting-html5-viewer---post-parameter-name-undefined#wVOaRf1DS0S5TILv4_DJ3g
I have no Newtonsoft.Json in the GAC and I'm running the latest nuget version (Newtonsoft.Json.7.0.1).
Any ideas how to fix?
4 Answers, 1 is accepted
Please check the Reporting REST service's settings and the handlers registrations added in the root's level web.config. All verbs used by the service must be allowed in the configuration - How To: Add Telerik Reporting REST Web API to Web Application (step 2).
In case the viewer and the service are hosted as separate applications, you will need to enable CORS for the service.
I hope this information is helpful.
Regards,
Stef
Telerik

Hi Stef,
Still no luck - I have followed the directions to the letter and have no crossdomain (CORS) issues.
I have a report controller pointing to a custom provider that looks like this:
public class ReportsController : ReportsControllerBase
{
static Telerik.Reporting.Services.ReportServiceConfiguration configurationInstance = new Telerik.Reporting.Services.ReportServiceConfiguration
{
HostAppId = "xxx",
ReportResolver = new CustomReportResolver(),
Storage = new Telerik.Reporting.Cache.File.FileStorage(),
};
public ReportsController()
{
this.ReportServiceConfiguration = configurationInstance;
}
}
Perhaps I am calling it from the client incorrectly?
$("#reportViewer1")
.telerik_ReportViewer({
serviceUrl: "https://xxx/api/reports/",
templateUrl: 'https://xxx/ReportViewer/templates/telerikReportViewerTemplate-9.2.15.930.html',
reportSource: {
report: getParameterByName("Id"),
parameters: {
CultureID: "en"
}
}
});
Note 'xxx' is replaced with my server name. Same issue appears locally and remotely.

And the error has moved onto:
POST https://xxx/api/reports/clients/023224-ab16/parameters 404 (Not Found)
xxx/api/reports/clients/023224-ab16/instances:1
POST https://xxx/api/reports/clients/023224-ab16/instances 404 (Not Found)
The errors still indicate the Reporting REST service is not reachable at the set address (viewer's serviceUrl).
Test if the Reporting REST service responds to requests by running the following URL in browser:
http:
//localhost:[portnumber]/api/reports/formats
Also check the logic of the custom resolver and test replacing it with any of the default report resolvers, just to exclude the custom code as a source of the problem.
static
ReportsController()
{
var appPath = HttpContext.Current.Server.MapPath(
"~/"
);
var reportsPath = Path.Combine(appPath, @
"..\..\..\Report Designer\Examples"
);
var resolver =
new
ReportFileResolver(reportsPath)
.AddFallbackResolver(
new
ReportTypeResolver());
configurationInstance =
new
ReportServiceConfiguration
{
HostAppId =
"Html5DemoApp"
,
Storage =
new
FileStorage(),
ReportResolver = resolver,
ReportSharingTimeout = 0,
ClientSessionTimeout = 15,
};
}
In order to investigate further the problem, please send us a demo project that reproduces the problem. For the purpose, you can use your support ticket on the same question.
Regards,
Stef
Telerik