I have created a telerik reporting rest service application using visual studio template and created a report as in the sample 'C:\Program Files (x86)\Telerik\Reporting R3 2016\Examples\CSharp\Html5Demo'. The report is loaded successfully.
But my front end is a separate application. So I have created a new project and added the 'index.html' and 'ReportViewer' folder into that and the 'serviceUrl' in index.html is updated as 'serviceUrl: "http://localhost:12345//api/reports/" '. I got CORS errors initially and resolved by adding custom header as
<add name="Access-Control-Allow-Origin" value="*"/>
<add name="Access-Control-Allow-Headers" value="*" />
<add name="Access-Control-Allow-Methods" value="*" /> in the report service(http://localhost:12345) web config.
But still, I am getting some error like
cannot load http://localhost:12345/api/reports/clients/141336-2297/parameters. Response for preflight has invalid HTTP status code 405
cannot load http://localhost:12345/api/reports/clients/141336-2297/instances. Response for preflight has invalid HTTP status code 405
even though my http://localhost:12345 is up.
Is there any solution for this.
Can I load the report viewer as a separate application from the report service?
My actual requirement is to load the report viewer in an AngularJS2 application. Since there is no AngularJS2 report viewer is available, I tried it to use in an independent JQuery application and later I can move the same to angular.