Runtime exception when using System.Web.Http.HttpRouteCollectionExtensions.MapHttpRoute

3

Getting a runtime exception when using MapHttpRoute extension method

Library: Microsoft.AspNet.WebApi (5.2.4), System.Web.Http (5.2.4) Exception:

System.MissingMethodException
  HResult=0x80131513
  Message=Method not found: 'System.Web.Http.Routing.IHttpRoute System.Web.Http.HttpRouteCollectionExtensions.MapHttpRoute(System.Web.Http.HttpRouteCollection, System.String, System.String, System.Object, System.Object, System.Net.Http.HttpMessageHandler)'.

Web.config dependent assembly mapping is also present

<dependentAssembly>
     <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
     <bindingRedirect oldVersion="0.0.0.0-5.2.4.0" newVersion="5.2.4.0" />
</dependentAssembly>

I have tried re-installing the Microsoft.AspNet.WebApi library but to no avail.

c#
asp.net-web-api2
asked on Stack Overflow Mar 12, 2018 by aditya arun

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0