Cannot access the Reporting REST service
|Product||Progress® Telerik® Reporting|
Cannot access the Reporting REST service. (serviceUrl = '/api/reports'). Make sure the service address is correct and enable CORS if needed (https://enable-cors.org)
The error indicates that the Telerik Reporting REST Service is not working properly or cannot be accessed by the viewer.
There are two main reasons for this error. In order to identify that, check the response to
/api/reports/formats GET request that should return the available document formats - see Get Available Document Formats article.
The REST Service is missing or not configured correctly:
If the response to the above request is not as expected:
Check whether the
ReportsControlleris configured correctly
Check the viewer's serviceUrl and adjust the relative path
- Test adding
~or remove the first
/- ASP.NET Web Project Paths
- The issue might be related to WebAPI controllers duplicating routes, which can be avoided by changing the registered by default Telerik Reporting REST Web API routes.
CORS is not configured correctly: If the REST Service is returning the available export formats, the report viewer client may not be able to access the service due to CORS limitations. When such issue is present you will see a CORS related error message in the browser's developer tools console (press
F12to open it). When hosting the service in a separate application you will need to enable CORS as explained in Enable cross-origin requests in ASP.NET Web API 2 article.
Тhe recommended troubleshooting approach is to use Fiddler Jam or other proxy tool to check the requests, their responses and statuses.
This will let you check requests to the Reporting REST service and whether the URLs are correct (if relative paths are resolved correctly). Relative paths may need adjustment depending on how the application is hosted.
If the problem persists, record a log with Fiddler Jam while running the application and share the log as a link with us in a support ticket - see First Steps with the Fiddler Jam Chrome Extension.
To help troubleshoot the issue, you may also record a trace listener log:
- For ASP.NET Core application, see the Troubleshooting reporting implementation into ASP.NET Core application article.
- For .NET Framework application, see the Create and Initialize Trace Listeners Microsoft article.