Hello everybody,
I am losing my hair on this one. Notice, I have never used routing or MVC before, so I am probably missing something obvious. I have a classic Web Forms project and need to integrate the new HTML5 Report Viewer.
Actually, when I start the HTML5 report viewer, I get the message inside the viewer "Error registering the viewer with the service". The html page is configured as suggested in Telerik's documentation, I have created a controller named "ReportsController" (as in doc).
To make run this controller, I have added the following in the Global.asax :
and I have created a class named "WebApiConfiguration.cs" as follows:
Notice, I made no changes inside the webconfig.file
If I type http://localhost:65483/api/reports in the browser, I actually get some xml code :
But the HTML5 report viewer always tells : "Error registering the viewer with the service".
Really don't know what to do about this. As I said, I have no experience in routing / MVC.
Thanks a lot for your help and time,
Vlad
I am losing my hair on this one. Notice, I have never used routing or MVC before, so I am probably missing something obvious. I have a classic Web Forms project and need to integrate the new HTML5 Report Viewer.
Actually, when I start the HTML5 report viewer, I get the message inside the viewer "Error registering the viewer with the service". The html page is configured as suggested in Telerik's documentation, I have created a controller named "ReportsController" (as in doc).
To make run this controller, I have added the following in the Global.asax :
protected void Application_Start(object sender, EventArgs e){ WebApplication1.App_Start.WebApiConfiguration.RegisterRoutes(GlobalConfiguration.Configuration);}and I have created a class named "WebApiConfiguration.cs" as follows:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Http;namespace WebApplication1.App_Start{ public static class WebApiConfiguration { public static void RegisterRoutes(HttpConfiguration httpConfiguration) { httpConfiguration.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = System.Web.Http.RouteParameter.Optional } ); Telerik.Reporting.Services.WebApi.ReportsControllerConfiguration.RegisterRoutes(httpConfiguration); } }}Notice, I made no changes inside the webconfig.file
If I type http://localhost:65483/api/reports in the browser, I actually get some xml code :
[{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLS","localizedName":"Excel 97-2003"},{"name":"XLSX","localizedName":"Excel Worksheet"},{"name":"PPTX","localizedName":"PowerPoint Presentation"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"MHTML","localizedName":"Web Archive"},{"name":"DOCX","localizedName":"Word Document"},{"name":"XPS","localizedName":"XPS Document"}]But the HTML5 report viewer always tells : "Error registering the viewer with the service".
Really don't know what to do about this. As I said, I have no experience in routing / MVC.
Thanks a lot for your help and time,
Vlad
