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

HTML5 Report viewer show 404 - not found / api/reports[/formats] unavailable

14 Answers 1827 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fridli Jacober
Top achievements
Rank 1
Fridli Jacober asked on 23 Dec 2014, 01:43 PM
Hello

I have a working HTML5 report viewer on my local pc running with VS 2013 dev. webserver.
From this project I copied the necessary files to our web application development server running windows server 2008 and IIS 7.
I copied the necessary DLLs as listed in the How-To, made the web.config entries (binding redirects / handlers) and the global.asax entry, added the report controller to the website's App_Code directory (not precompiled web application), copied the html, css and js files and so on.
The Newtonsoft.JSON.dll seems to be not in the GAC. I copied it too from my working local project.

When I now open the viewer, I see the frame and as soon as it "loads data" It shows 404 - not found where the report should appear:

Module: IIS Web Core
Notification: MapRequestHandler
Handler: StaticFile (is this correct?)
Error code. 0x80070002
Requested URL: http://.....ch:80/api/reports/clients

When I open .../api/reports/formats it shows the same error message. Seems that the handler is not catching the request?
I've also restarted the website and the app. pool several times and tried changing targetFramework to 4.5 but it didn't change anything.
Of course I have some third party handlers but I put the report viewer in a subdirectory with an own web.config where I remove those handlers again without success.

I don't know what to try further but I think I didn't make a mistake by myself. All necessary content from my local project should be on the server as well.

thanks for any help getting this nasty report viewer finally to work - hopefully on the production server too some time!

regards

14 Answers, 1 is accepted

Sort by
0
Fridli Jacober
Top achievements
Rank 1
answered on 23 Dec 2014, 01:49 PM
P.S. I didn't install anything through NuGet.
I just put the DLLs from my local test project in the development server application's bin folder according to the How-To.
0
Stef
Telerik team
answered on 25 Dec 2014, 02:12 PM
Hello Fridli,

On your developmnet machine, verify all required assemblies CopyLocal property is set to true. Then use Visual Studio to publish the application in the local file system. Finally, host the application in local IIS to test if the service responds (the test at step 8) and if the whole application can be loaded.
Once you verify all settings are correct, copy the already published content in the other environment.

To troubleshoot the problem, download and install Fiddler. In Fiddler - Inspectors - Request/Response - Raw tabs will be listed the made requests (their URLs, headers and content), and the corresponding responses.


If you need further help, please open a support ticket and send us a demo project illustrating your settings, including details how the application is hosted and the SAZ file created by Fiddler.

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
Fridli Jacober
Top achievements
Rank 1
answered on 08 Jan 2015, 04:45 PM
"On your developmnet machine, verify all required assemblies CopyLocal property is set to true."

But I manually copied all necessary assemblies and other stuff from my working local test project to the web application.

"Then use Visual Studio to publish the application in the local file system. Finally, host the application in local IIS to test if the service responds (the test at step 8) and if the whole application can be loaded. 
Once you verify all settings are correct, copy the already published content in the other environment."

Unfortunately, I can't do this since I haven't got the same prequisites and tools on the dev server.
Also the application is not compileable by VS atm because VS "thinks" many stuff is missing (like HttpContext, DateTime and many other) even though the application itself runs just fine in IIS (it's a not precompiled website project).
No idea why but since some time I've got those problems with VS. Maybe because some changes in web.config...??

"To troubleshoot the problem, download and install Fiddler."

I don't think this will help much since I know the problem. The REST service is'nt working (even though the handlers are in web.config),
noticeable by the 404 / not found error page when calling .../api/reports/formats which the report viewer shows too.
But I don't know why it's not running. Do I have to register something manually (path/handler mapping) in the registry or in IIS?
I use IIS7 on the dev server.

Thx!
0
Nasko
Telerik team
answered on 13 Jan 2015, 12:28 PM
Hello Fridli Jacober,

Unfortunately we are not sure which of your project settings and configuration causes the described behavior given the provided information.
In order to investigate further we will need the following information: a runnable sample project illustrating your settings; the log file created by Fiddler.
In order to send us the requested information you can open a new support ticket and attach the files there. Once we have the needed information we will get back to you and provide further suggestions.

Regards,
Nasko
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
Fridli Jacober
Top achievements
Rank 1
answered on 13 Apr 2015, 01:24 PM

Hello and thanks for your reply:

We're setting up a new machine w. Win Srv. 2012 R2 and VS Community 2013 and newest technologies for our web application and html 5 report viewer, hoping this will solve especially our session loss issues and that I get the html 5 viewer running on this machine.
So we'll see how the application and everything will run on this new environment.

0
Fridli Jacober
Top achievements
Rank 1
answered on 13 Apr 2015, 01:26 PM

P.S. you offer your REST service for ServiceStack and for .NET WebApi.

But which one should we use? Unfortunately I nowhere found definitive infos which one is the preferable one.

(Dis) advantages? Performance?

Thanks for any infos...

0
Nasko
Telerik team
answered on 16 Apr 2015, 10:15 AM
Hello Fridli Jacober,

Whether you use ServiceStack or WebApi is up to your technology stack preference and requirements.
For performance reviews and other comparisons, please refer to the following resources:
Regards,
Nasko
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Fridli Jacober
Top achievements
Rank 1
answered on 27 Apr 2015, 03:27 PM

Thanks but this doesn't help me much further...

But I guess as long as nobody tells me how very much slower WebApi is we'll keep using it as it's running this way.

Thanks & regards

0
abrar
Top achievements
Rank 1
answered on 08 Mar 2017, 11:35 AM
I have the same type of problem here. 
Did you found any solution of this problem? 
0
Stef
Telerik team
answered on 08 Mar 2017, 05:07 PM
Hello abrar,

Please check the Troubleshooting section of the HTML5 Viewer. In order to provide you more accurate suggestions, we will need more details about the issue.

Regards,
Stef
Telerik by Progress
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
abrar
Top achievements
Rank 1
answered on 09 Mar 2017, 09:02 AM

I read your suggested article but till now I am unable to figure out the actual problem. 
Here is the image of my chrome network tab

It gets the template and clients id successfully and then

Request to the api to 
/api/reports/clients/173124-70a4/parameters
with 
Request Method:OPTIONS
gives 
Status Code:200 OK .

 

But when it sends with Request Method:Post Then the problem occurs. 




0
Stef
Telerik team
answered on 09 Mar 2017, 04:52 PM
Hello abrar,

There is a request gathering information about the report parameters of the requested report, which allows the viewer to display a parameters area for all visible parameters. For all invisible parameter you have to provide valid values on creating the viewer, or set such on designing the report.

If you need further help, please post the code for generating the report where we can check all report parameters settings.

Regards,
Stef
Telerik by Progress
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
abrar
Top achievements
Rank 1
answered on 11 Mar 2017, 06:45 AM
 I tested by commenting the report parameters  [parameters: {fromDate: new Date()}] but it is not working.
 
<div ng-controller="ReportController" ng-init="Init()" class="bPanel">
    <div class="bHeaderPanel">
        <table class="bFilterbar">
            <tr>
                <td>From: </td>
                <td>
                    <input type="text" id="Fromdatepicker" kendo-date-picker k-ng-model="FromSearchDate" k-options="datePickerOptions_for_to" ng-click="FromDateOpen(this)" />
                </td>
                <td>To: </td>
                <td>
                    <input id="Todatepicker" kendo-date-picker k-ng-model="ToSearchDate" k-options="datePickerOptions_for_to" ng-click="ToDateOpen(this)" />
                </td>
                <td>
                    <button type="button" class="kendoBtn-big" ng-click="SearchCommand()">
                        <!--<i class="fa fa-search" aria-hidden="true"></i> Search-->
                         
                        <i class="glyphicon glyphicon-search"></i> Search
                    </button>
                </td>
            </tr>
        </table>
    </div>
    <div id="reportViewer1" class="k-widget" style="margin-top: 50px;">
        loading...
    </div>
</div>
     
 
<script type="text/javascript">
    $(document).ready(function () {
         
        $("#reportViewer1")
            .telerik_ReportViewer({
                // The URL of the service which will serve reports.
                // The URL corresponds to the name of the controller class (ReportsController).
                // For more information on how to configure the service please check http://www.telerik.com/help/reporting/telerik-reporting-rest-conception.html.
                serviceUrl: "http://http://172.16.2.39:8378/api/reports",
 
                // The URL for the report viewer template. The template can be edited -
                // new functionalities can be added and unneeded ones can be removed.
                // For more information please check http://www.telerik.com/help/reporting/html5-report-viewer-templates.html.
                templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-9.0.15.324.html',
 
                //ReportSource - report description
                reportSource: {
 
                    // The report can be set to a report file name (trdx report definition)
                    // or CLR type name (report class definition).
                    report: "Balance.trdx",//"Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary",
 
                    // Parameters name value dictionary
                    parameters: {fromDate: new Date()}
                },
                pageReady: function(e) { console.log("this event handler was attached in the constructor"); },
                // Specifies whether the viewer is in interactive or print preview mode.
                // PRINT_PREVIEW - Displays the paginated report as if it is printed on paper. Interactivity is not enabled.
                // INTERACTIVE - Displays the report in its original width and height without paging. Additionally interactivity is enabled.
                viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
 
                // Sets the scale mode of the viewer.
                // Three modes exist currently:
                // FIT_PAGE - The whole report will fit on the page (will zoom in or out), regardless of its width and height.
                // FIT_PAGE_WIDTH - The report will be zoomed in or out so that the width of the screen and the width of the report match.
                // SPECIFIC - Uses the scale to zoom in and out the report.
                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
 
                // Zoom in and out the report using the scale
                // 1.0 is equal to 100%, i.e. the original size of the report
                scale: 1.4,
 
                ready: function (e) {
                    var reportViewer = $("#reportViewer1").data("telerik_ReportViewer");
                    console.log(reportViewer);
                }
            });
    });
 
    $(".kendoBtn-big").kendoButton({
        enable: true
    });
</script>
 
 
 
<style>
        #reportViewer1 {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 5px;
            bottom: 5px;
            font-family: 'segoe ui', 'ms sans serif';
            overflow: hidden;
        }
    </style>
0
Stef
Telerik team
answered on 13 Mar 2017, 03:45 PM
Hi abrar,

Please open the ReportController.cs file and check which folder is mapped by the Reporting REST service's resolvers. Then check if the Balance.trdx file is available in that folder.

Follows, open the Balence.trdx report in the Standalone Report Designer of Telerik Reporting Q1 2015 and check the report's ReportParameters collection. It should contain a report parameter named fromDate. Test setting the Value property of each report parameter and then run preview in browser.


In addition, update the viewer's serviceUrl to use the correct address of the Reporting REST Service. In case the Reporting RET Service is hosted separately, you will have to enable CORS:
  1. How To: Add Telerik Reporting REST Web API to Web Application (verify all settings are added correctly);
  2. Enabling Cross-Origin Requests in ASP.NET Web API 2.


Regards,
Stef
Telerik by Progress
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
Tags
General Discussions
Asked by
Fridli Jacober
Top achievements
Rank 1
Answers by
Fridli Jacober
Top achievements
Rank 1
Stef
Telerik team
Nasko
Telerik team
abrar
Top achievements
Rank 1
Share this question
or