2017-04-28 13 views
1

私はMVCプロジェクトを持っています。私はTelerik Reporting Servicesを内部に追加しようとしています。Telerik Reporting Services

私は、これは

Telerik.Reporting 
Telerik.Reporting.Services.WebApi 
Telerik.Reporting.XpsRendering 
Telerik.ReportViewer.Mvc 

また、私のWepApiConfigで

public static class WebApiConfig 
{ 
    public static void Register(HttpConfiguration config) 
    { 

     // config.MapHttpAttributeRoutes(); 

     config.Routes.MapHttpRoute(
      name: "DefaultApi", 
      routeTemplate: "api/{controller}/{id}", 
      defaults: new { id = RouteParameter.Optional } 
     ); 

     Telerik.Reporting.Services.WebApi.ReportsControllerConfiguration.RegisterRoutes(config); 
    } 
} 

と私は私のプロジェクトを実行したときに、私はこの例外

Method not found: 'Void Telerik.Reporting.Services.WebApi.ReportsControllerConfiguration.RegisterRoutes 

約だれでも手掛かりを持って取得を参照して追加しました何が起こるのですか?

答えて

0

このエラーの原因は、Reporting REST WebAPIサービスがWebAPI に対して構築されているためです。

あなたのケースでは、新しいバージョン(WebAPI )を使用しています。

だから、あなたは彼らの新しいバージョンにSystem.Web.HttpSystem.Net.Http.Formattingをリダイレクトする必要があります。現在のバージョンで

5.2.3.0

<configuration> 
    <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Http" culture="neutral" publicKeyToken="31bf3856ad364e35"/> 
     <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="5.2.3.0"/> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Net.Http.Formatting" culture="neutral" publicKeyToken="31bf3856ad364e35"/> 
     <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="5.2.3.0"/> 
     </dependentAssembly> 
    </assemblyBinding> 
    </runtime> 
</configuration> 

をして置き換えます

これを行うには、あなたのweb.configファイルに次のbindingRedirectsを追加5.2.3.0は現在、最新のものです。

web.configにすでにセクションが含まれている場合は、ノードを追加するだけです。

taken from this article