I have a web API in which version 5.1.2 of the package is installed Microsoft.AspNet.WebApi.Client.
I am trying to access the API from an ASP.NET MVC application that also has the same version of the installed package.
However, in the Global.asax project of the Web API project, in the line below, I get the following exception:
WebApiConfig.Register(GlobalConfiguration.Configuration);
An attempt by the 'System.Web.Http.HttpConfiguration..ctor (System.Web.Http.HttpRouteCollection)' method to access the 'System.Web.Http.HttpConfiguration.DefaultFormatters ()' method failed.
source
share