Try our conversational search powered by Generative AI!

WebAPI + EPi + .NET 4.5 not working


Hi, everyone,

I've followed the example here:


However, I've stumbled upon the first step: registering a route. This is the error I get on:

 System.Net.Http.HttpMessageHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a


                       name: "ActionApi",
                       routeTemplate: "api/{controller}/{action}/{id}",
                       defaults: new { id = RouteParameter.Optional }


Anyone had the same problem? And a solution?



Jul 05, 2013 17:14

The problem might be that System.Net.Http is already included in 4.5. The reference in your project probably points to the one in the webapi package, which is needed for 4.0? If so, just remove that reference and add one to the one included in the framework. Hopefully that will solve your problem.

Jul 07, 2013 9:27

Version is also an old version, afaik you should use version


Jul 08, 2013 8:43
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.