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

5 posts, 1 answers
  1. Ghayth Hilal
    Ghayth Hilal avatar
    9 posts
    Member since:
    Oct 2009

    Posted 21 Mar Link to this post

    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

  2. Answer
    Stef
    Admin
    Stef avatar
    3053 posts

    Posted 22 Mar Link to this post

    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
  3. DevCraft banner
  4. Ghayth Hilal
    Ghayth Hilal avatar
    9 posts
    Member since:
    Oct 2009

    Posted 22 Mar Link to this post

    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;

  5. Scott
    Scott avatar
    20 posts
    Member since:
    Aug 2011

    Posted 22 Mar Link to this post

    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 ?

    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

  6. Stef
    Admin
    Stef avatar
    3053 posts

    Posted 24 Mar Link to this post

    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
Back to Top
DevCraft banner