I'm getting this error when trying to access Web API controller, accessing via 127.0.0.1/api/myController/1
Could not load type 'System.Web.Http.WebHost.HttpControllerHandler' from assembly 'System.Web.Http.WebHost, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.Http.WebHost.
Why is this happening? I see that it exists in System.Web.Http.WebHost.
The error was due to the use of latest assemblies via NuGet. It turns out that, currently, Mono isn't completely compatible with WebAPI v5.1.
I replaced all my MVC libraries with a previous (v4.0) version and it all worked.