2017-04-28 1 views
1

MVC 프로젝트가 있는데, Telerik Reporting Services를 내부에 추가하려고합니다.Telerik Reporting Services

내가 추가 한이 내 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); 
    } 
} 

에서, 또한

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

를 참조 그리고 난 내 프로젝트를 실행할 때 나는이 예외를 얻을

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

는 단서에 대한 사람을 가지고 무슨 일이야?

답변

0

이 오류의 원인은보고 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