I get this error when trying to access the web API controller by accessing through 127.0.0.1/api/myController/1
Failed to load type 'System.Web.Http.WebHost.HttpControllerHandler' from the assembly 'System.Web.Http.WebHost, Version = 5.1.0.0, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35'.Description: HTTP request 500.Error.Details: Internet exclusion. Original origin (application name or object): System.Web.Http.WebHost.
Failed to load type 'System.Web.Http.WebHost.HttpControllerHandler' from the assembly 'System.Web.Http.WebHost, Version = 5.1.0.0, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35'.
Description: HTTP request 500.Error.
Details: Internet exclusion. Original origin (application name or object): System.Web.Http.WebHost.
Why is this happening? I see that it exists in System.Web.Http.WebHost.
The error occurred due to the use of the latest builds through NuGet. It turns out that Mono is currently not fully compatible with WebAPI v5.1.
I replaced all my MVC libraries with the previous (v4.0) version, and it all worked.