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

/api/reports/resources/font/fonticons-css throwing 404 - File or directory not found

7 Answers 882 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ghayth Hilal
Top achievements
Rank 1
Ghayth Hilal asked on 21 Mar 2016, 03:42 PM

I've finished converting our existing Telerik reporting application to the HTML5 report viewer, once deployed to the server the app starts throwing a 404 error.

here's a list of what I'm using and what's installed on both the Dev machine and the Server (IIS 7.0):

  • Telerik reporting 10.0.16.204 (Feb 05, 2016)
  • Kendo UI Prof 2016.1.226 (Feb 26, 2016)
  • .Net 4.5
  • The Dev machine uses IIS Express
  • The Server runs IIS 7.0

I used Fiddler to inspect and compare the requests/responses, and here's a copy:

Dev Machine

200    HTTP    localhost:64290    /Viewer.aspx?c=ddee2936-b35f-4766-b0e8-37340e5e7df7&u=d94ae397-e4a2-46fc-b95b-1308f5c85c8e&r=5c1dea16-47ff-458c-9a79-e8fb96233a02    24,933    private    text/html; charset=utf-8    iexplore:15028            
200    HTTP    localhost:64290    /js/jquery-1.10.2.js    108,002        application/javascript    iexplore:15028            
200    HTTP    localhost:64290    /ClientThemes/Tracker/kendo.css    14,833        text/css    iexplore:15028                        
200    HTTP    localhost:64290    /WebResource.axd?d=mc-7ZkzJDFkxx81trXXMYnKRFBj8nw...    13,215    public; Expires: Tue, 21 Mar 2017 13:19:11 GMT    text/css    iexplore:15028            
200    HTTP    localhost:64290    /WebResource.axd?d=eiUm-0avedYOJt0Pnasm6tHaVdNsY_...    91,511    public; Expires: Tue, 21 Mar 2017 13:19:11 GMT    text/javascript    iexplore:15028            
200    HTTP    localhost:64290    /WebResource.axd?d=U-QtGVIjXaG-VilkbaKZwpYORbfoTy...    53,503    public; Expires: Tue, 21 Mar 2017 13:19:11 GMT    text/css    iexplore:15028                    
200    HTTP    localhost:64290    /WebResource.axd?d=DqDmbWgg4b-vCGBbWHkNnsxNjZkW7Z...    24,238    public; Expires: Tue, 21 Mar 2017 13:19:11 GMT    text/javascript    iexplore:15028            
200    HTTP    localhost:64290    /Templates/tSimple.html    1,390        text/html    iexplore:15028    

IIS Server

200    HTTPS    reportingURL    /Viewer.aspx?c=ddee2936-b35f-4766-b0e8-37340e5e7df7&u=d94ae397-e4a2-46fc-b95b-1308f5c85c8e&r=5c1dea16-47ff-458c-9a79-e8fb96233a02    46,481    private    text/html; charset=utf-8    iexplore:12336            
200    HTTPS    reportingURL    /js/jquery-1.10.2.js    273,990        application/x-javascript    iexplore:12336            
200    HTTPS    reportingURL    /ClientThemes/Tracker/kendo.css    70,577        text/css    iexplore:12336                                                
200    HTTPS    reportingURL    /WebResource.axd?d=U-QtGVIjXaG-VilkbaKZwi-WFq2bsW...    243,472    public; Expires: Tue, 21 Mar 2017 14:53:06 GMT    text/css    iexplore:12336            
200    HTTPS    reportingURL    /WebResource.axd?d=eiUm-0avedYOJt0Pnasm6rXLcuIS9X...    213,589    public; Expires: Tue, 21 Mar 2017 14:53:06 GMT    text/javascript    iexplore:12336            
200    HTTPS    reportingURL    /WebResource.axd?d=mc-7ZkzJDFkxx81trXXMYjjRyE7-m5...    59,114    public; Expires: Tue, 21 Mar 2017 14:53:06 GMT    text/css    iexplore:12336                    
200    HTTPS    reportingURL    /WebResource.axd?d=DqDmbWgg4b-vCGBbWHkNnrPy2xQHYi...    67,797    public; Expires: Tue, 21 Mar 2017 14:53:06 GMT    text/javascript    iexplore:12336            
200    HTTPS    reportingURL    /Templates/tSimple.html    5,061        text/html    iexplore:12336            
404    HTTPS    reportingURL    /api/reports/resources/font/fonticons-css    1,245        text/html    iexplore:12336            
404    HTTPS    reportingURL    /api/reports/resources/styles/telerikReportViewer-css    1,245        text/html    iexplore:12336

 

I've realized that I have 2 extra requests on my Server, and they are both returning 404 response

  • /api/reports/resources/font/fonticons-css
  • /api/reports/resources/styles/telerikReportViewer-css

and here's my questions:

  1. why I have 2 extra requests on my server? (and/or why don't I see these requests on my Dev machine)
  2. if these are legit requests, why are they returning a 404?
    these requests look like a resource requests,
    where does the API call look for resources? (i.e where does /api/reports/resources/ points to?)

Your help is much appreciated,
Ghayth Hilal

7 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 22 Mar 2016, 10:28 AM
Hello Ghayth,

The additional requests are for the viewer's CSS template file and icons font. Both requests are sent from the loaded viewer's HTML template file and they are required for the proper displaying of the viewer.

Please check the How To: Add Telerik Reporting REST Web API to Web Application article and test if the Reporting REST service responds correctly to requests in browser. Test also to publish the application in local IIS on the dev machine and if relative paths are resolved correctly (the paths set as viewer' serviceUrl and any additional for CSS, JS and HTML files).

The recommended troubleshooting approach is to use Fiddler or other proxy tool to check the requests, their responses and statuses. Information about requests and responses content can be seen in Fiddler - Inspectors - Request/Response - Raw tabs. This will let you check requests to the Reporting REST service and if the URLs are correct (if relative paths are resolved correctly).
Note that relative paths may need adjustment depending on how the application is hosted.



Feel free to open a support ticket and send us the log file generated by Fiddler.


Regards,
Stef
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
Ghayth Hilal
Top achievements
Rank 1
answered on 22 Mar 2016, 02:02 PM

Stef;

I've done all the necessary steps to set up the Reporting API, but one thing you said caught my attention "Test also to publish the application in local IIS on the dev machine and if relative paths are resolved correctly"

I've created another controller ( a test controller) and tried to call it form IIS 7...and a 404 response showed up!
it was an IIS 7 "API resolving" issue.

my first search came across this post by "rogcg"
http://stackoverflow.com/questions/15389855/asp-net-web-api-application-gives-404-when-deployed-at-iis-7

 

I don't understand why but adding runAllManagedModulesForAllRequests="true" did the trick.
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/> <-- this was here
    <modules runAllManagedModulesForAllRequests="true"/> <-- this did the trick
</system.webServer>
Anybody who can explain why?

 

doing further research on that lead me to this MSDN page
https://www.iis.net/configreference/system.webserver/modules

half way on that page, in the Attributes section there's a description of the runAllManagedModulesForAllRequests
and here's the part that describes my problem:

Note:
In ASP.NET websites, the value of runAllManagedModulesForAllRequests previously had to be set to true to support routing. However, once IIS 7 has been updated with a Service Pack, the value of runAllManagedModulesForAllRequests can be set to false or omitted when working with ASP.NET routing

 

and that did it...my problem is solved.

I've closed the support ticket and added my findings to this forum to be accessible to all.

I still like to know where does the report api look for these resources?
per example, where does this call go to "/api/reports/resources/styles/telerikReportViewer-css"  to find the CSS ?
a web resource, a dll, an installation folder ?

thank you;

0
Scott
Top achievements
Rank 1
answered on 22 Mar 2016, 02:45 PM

[quote]I still like to know where does the report api look for these resources?
per example, where does this call go to "/api/reports/resources/styles/telerikReportViewer-css"  to find the CSS ?
a web resource, a dll, an installation folder ?[/quote]

I'd like to know about this too as my Fiddler analysis is showing the same 404 on this item. Mine however is also not quite displaying the report correctly. The toolbar is stacked across the entire screen row by row and looks like a mobile view. The report data itself displays correctly, however.

Thanks,

Scott

-1
Stef
Telerik team
answered on 24 Mar 2016, 06:27 PM
Hello,

For anyone interested, I posted the answer to Scott's question in the Reporting in MVC 6 forum thread.

Regards,
Stef
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
Frank
Top achievements
Rank 1
commented on 14 Feb 2023, 06:49 PM

You did not answer the question in the linked. How about instead of redirecting someone to somewhere else, you just ansewr the question. If you don't have the answer, then just don't answer and save us all some time.
Todor
Telerik team
commented on 17 Feb 2023, 09:25 AM

Hi Frank,

Please, note that this is an old thread and the information may not be up to date.

With our latest versions, all the needed resources for the viewer are embedded in the REST Service. You may check the template of the viewer for the links to the fonts and CSS styles. Here is what they look like:

<!--Telerik served resources. For more information see: http://docs.telerik.com/reporting/html5-report-viewer-styling-and-appearance -->
<link href="{service}resources/font/fonticons-17.0.23.118.css/" rel="stylesheet" />
<link href="{service}resources/styles/telerikReportViewer-17.0.23.118.css/" rel="stylesheet" />

You may test this also in our online demos. The CSS of the viewer may be found at https://demos.telerik.com/reporting/api/reports/resources/styles/telerikReportViewer-{version}.css. Note that when we upgrade to a higher version, the link may stop working.

If this doesn't answer your technical questions, you may open a Support Ticket and elaborate on the problem so that we may try to assist.

 

Frank
Top achievements
Rank 1
commented on 17 Feb 2023, 02:33 PM

Thank you for providing the link to the resource. I can now at least make a local copy of the files to get around the error I was receiving.

When adding the various nuget packages to my project in Visual Studio these files are not added to the project. The project is a .net C# web application. I would have expected, just like the template file being part of my project, these files too would be part of the project. Is this an incorrect assumption?

I have KendoUIProfessional, Telerik.Reporting, Telerik.Reporting.Services.WebApi, Telerik.ReportViewer.Html5.WebForms, and Telerik.UI.for.AspNet.Ajax.Net45 nuget packages installed.

Todor
Telerik team
commented on 22 Feb 2023, 08:01 AM

Hi Frank,

The CSS files are embedded as resources in the Telerik Reporting REST Service and the HTML5 Viewer's template requests them from the service. That said, they are already part of your project.

It is important to note that the version of the viewer and the service should match. This is a must if you need them to communicate and work as expected. Since the version is part of the request URL, it may not find the resource if the service and the viewer have different versions.

0
Wai Han
Top achievements
Rank 1
answered on 21 Jan 2019, 08:25 AM

First, register the report api route (by image1)

Second, Call it in the Global.asax.cs (by image 2)

 

 

0
Nasko
Telerik team
answered on 23 Jan 2019, 04:16 PM
Hello Wai Han,

The screenshots and the steps are spot on! Thanks!

Regards,
Nasko
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
Neha
Top achievements
Rank 1
answered on 28 May 2019, 08:25 AM

Hello,

I am facing issue with Telerik report control ,attached the error log file.

Also it is working fine in localhost , only getting issue in DEV environment.:

Failed to decode downloaded font :<URL>

https://iamadvisorydev.us.kworld.kpmg.com/api/reports/resources/font/TelerikWebUI-woff

 

Tags
General Discussions
Asked by
Ghayth Hilal
Top achievements
Rank 1
Answers by
Stef
Telerik team
Ghayth Hilal
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Wai Han
Top achievements
Rank 1
Nasko
Telerik team
Neha
Top achievements
Rank 1
Share this question
or