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

MVC-reporting widget

2 Answers 144 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Petteri
Top achievements
Rank 1
Petteri asked on 11 Feb 2015, 03:33 PM
Hello,
I'm trying to setup the MVC-report viewer as instructed (http://www.telerik.com/help/reporting/telerik-reporting-rest-implementing-http-service.html)
My other WebApi controllers seem to be working just fine but when the report viewer widget loads, it reaches ReportsController but then fails ( with call to /api/reports/clients)

ExceptionMessage:"Method not found: 'System.Net.Http.HttpResponseMessage System.Net.Http.HttpRequestMessageExtensions.CreateResponse(System.Net.Http.HttpRequestMessage, System.Net.HttpStatusCode, !!0, System.Net.Http.Formatting.MediaTypeFormatter)'."

ExceptionType:"System.MissingMethodException"

StackTrace:"   at Telerik.Reporting.Services.WebApi.ReportsExceptionFilter.OnException(HttpActionExecutedContext context)
   at System.Web.Http.Filters.ExceptionFilterAttribute.OnExceptionAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ExceptionFilterAttribute.<ExecuteExceptionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__0.MoveNext()"

Any idea what part have I screwed up?


2 Answers, 1 is accepted

Sort by
0
Petteri
Top achievements
Rank 1
answered on 12 Feb 2015, 09:00 AM
Also, the code in ReportsController reaches CreateCache but never CreateReportResolver
0
Petteri
Top achievements
Rank 1
answered on 12 Feb 2015, 12:01 PM
Problem was solved by adding this piece to web.config:
<dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
</dependentAssembly>
Tags
General Discussions
Asked by
Petteri
Top achievements
Rank 1
Answers by
Petteri
Top achievements
Rank 1
Share this question
or