This is a migrated thread and some comments may be shown as answers.

404 not found - html viewer -> call to web api service

7 Answers 540 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arne
Top achievements
Rank 1
Arne asked on 04 Feb 2015, 11:50 AM
Hi,

I've followed this guide: http://www.telerik.com/help/reporting/telerik-reporting-rest-host-http-service-using-web-hosting.html in order to host the telerik reporting service. When i run http://localhost:[portnumber]/api/reports/formats i get a valid response.

When i try to run the html5 viewer i get a black line and no reports showing.

After examining the network i can see that the client posts to localhost/api/reports/clients which returns a clientId, then it posts to localhost/api/reports/clients/{id from previous call}/parameters which returns a 404 not found (standard IIS not found page).


Any suggestions ?

7 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 06 Feb 2015, 04:31 PM
Hi Arne,

Please check if you have all settings and packages listed in the How To: Add Telerik Reporting REST Web API to Web Application article. When you test the reporting REST service, verify there is no other WebAPI route covering the http://localhost:[portnumber]/api/reports/formats template.

Test also to upgrade all packages through Nuget to the latest versions, and check if binding redirects are added in the project's web.config. Check also if the report's project is referenced in the service's project, and if all projects use the same Telerik Reporting version.

Depending on how the application is hosted, you should use the corresponding cache storage for the service - REST Service storage. If the service is hosted separately, and uses a different domain you may need to enable CORS to allow the communication between the clients(viewers) and the service.


Note that the page with the viewer's DIV container must be loaded before the viewer's object is created via Javascript.


The recommended troubleshooting approach when using the viewer is to use the browser's Console or download and install Fiddler. In Fiddler - Inspectors - Request/Response - Raw tabs will be listed information about the made request and its response, including a list of all performed requests for the page. You can also use the local demos installed by default under C:\Program Files (x86)\Telerik\Reporting <VERSION>\Examples for reference.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Arne
Top achievements
Rank 1
answered on 11 Feb 2015, 09:23 AM
Hi,

The html5 viewer crashes when i upgrade web api or enables CORS (which forces upgrade). When i create a new web api project and follow the guide it works.


Regards
Arne
0
Stef
Telerik team
answered on 12 Feb 2015, 08:42 AM
Hello Arne,

Please check if after updating the Nuget packages there are added proper binding redirects in the configuration file.

About enabling CORS, download and install Fiddler to check the performed requests and the reason for their failure in Fiddler - Inspectors - Request/Response - Raw tabs. You can also make a text compare with the files of the new working project to isolate the reason for the error in the original project.


I hope this troubleshooting information helps you.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Juris
Top achievements
Rank 1
answered on 03 Mar 2017, 12:30 PM

I had similar issue (404 not found) when I was POSTing parameters to the self-hosted reporting service (cross-origin). In the report service application I had to include the report *.trdp into the build folder by switching "Copy to output directory" parameter to "Copy always" (Property section in Visual Studio) in order this to work.

I hope it will help.

0
saleng
Top achievements
Rank 1
answered on 14 Sep 2017, 04:13 AM

Was there any resolution to this issue?  I'm encountering the same situation.

 

Thanks

0
Katia
Telerik team
answered on 18 Sep 2017, 12:48 PM
Hello saleng,

Such issue is most likely caused by the incorrect settings of the Reporting REST service. You can check the suggestions provided by Stef in this post.

We recommend using any proxy tool or browser's console to check requests made by the viewer, this will let you see which requests failed and more detailed error messages.

In case the issue persists send us the problematic project in a support ticket so we can test it locally.


Regards,
Katia
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
saleng
Top achievements
Rank 1
answered on 18 Sep 2017, 03:42 PM

Thanks Katia,

I was able to resolve this by manually registering the routes as in this post.  I believe that this can also be achieved by calling ReportsControllerConfiguration.RegisterRoutes from your global.asax like in this post.

Hope this helps others who might be having issues with this.

Thanks,

Saleng

Tags
General Discussions
Asked by
Arne
Top achievements
Rank 1
Answers by
Stef
Telerik team
Arne
Top achievements
Rank 1
Juris
Top achievements
Rank 1
saleng
Top achievements
Rank 1
Katia
Telerik team
Share this question
or