Instructions as to how to set up Reporting don't seem to work with current Visual Studio Projects

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    34 posts
    Member since:
    Oct 2011

    Posted 08 Jan 2015 Link to this post

    I've reported this in a support ticket, but a) I haven't had a response yet, and b) I thought others ought to be aware of this too.
    I've managed to get reports with the html5 report viewer working fine a few months ago, but somehow the instructions on the Telerik site don't seem to have kept up with changes to the standard Visual Studio MVC/WebApi templates.
    From my support ticket request:

    I've been trying to get even a basic Report working in MVC/WebApi projects and the Telerik current instructions as to how to do it no longer seem to work, perhaps because of changes in the versions of some Microsoft dlls (and possible changes in the template files, eg to WebApiConfig.cs and Global.asax) in current Visual Studio 2013 Update 3 projects.

    I've had a variety of problems, including run time errors (like the one below, or saying that the .../client resource could not be found), but I attach an example project.

    This project was just a basic, right out of the box MVC5/WebApi web application that I created from the templates in Visual Studio 2013 Update 3.  I checked that it built and ran fine. I then added a Telerik Html5 Report Viewer Item Template (Q3 2014) to the project.  A report page then came up telling me that I needed to add various redirects to the web.config file (because the project contained newer versions of dlls than those expected) - I added these lines to the web.config file.

    Then I built the project successfully, but when I tried running it, I got the following error in Application_Start() in Global.asax.cs: " Adding or removing items from a 'HttpRouteCollection' is not supported. Please use a key when adding and removing items":


     // this line gives the following error when running the project:
                // Adding or removing items from a 'HttpRouteCollection' is not supported. Please use a key when adding and removing items.
                ReportsControllerConfiguration.RegisterRoutes(GlobalConfiguration.Configuration);

    How can I solve this?  Please will you consider rechecking your installation instructions and modifying them as necessary so that they work with the current Visual Studio standard templates for MVC/WebApi projects?
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 08 Jan 2015 Link to this post

    Hello Patrick,

    Below you can find a quote from your support ticket on the same question:
    "In the provided project we made the following changes:
    1. Ran the Upgrade Wizard to update to version 8.2.14.1222 (the latest available internal build);
    2. Copied all required Telerik Reporting assemblies in the Bin folder (CopyLocal setting to true);
    3. Added binding redirects by suggestion from Visual Studio (Warnings window);
    4. Removed conflicts (duplicated binding redirects in the web.config).
      Binding redirects must not be added manually, unless Visual Studio fails to update the web.config. To verify there are no issues, check the referenced assemblies properties and the applied bindings redirects.You can also run Nuget Manager and update all packages, where VS should update bindings redirects.
    ."

    If you need further help, please let us continue the discussion in one of the threads to keep a better track on the exchanged information.

    Thank you for your understanding.

    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.

     
Back to Top