Bug 19314 - Issues with Web API 5.1.2 (I got exception on Mono).
Summary: Issues with Web API 5.1.2 (I got exception on Mono).
Status: RESOLVED INVALID
Alias: None
Product: Class Libraries
Classification: Mono
Component: General ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-04-26 08:37 UTC by Maxim
Modified: 2014-05-23 10:22 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Maxim 2014-04-26 08:37:30 UTC
Description of Problem:
Exception during call to Web API controller.

Steps to reproduce the problem:
1. Use mono 3.2.8 compiled and installed on CentOS 6.5
2. Create empty ASP.Net site (I used VS).
3. Add manually latest MVC 5 and Web API 2 (5.1.2).
4. Create test method and try to call it.

You will get exception...

Additional Information:

Application Exception
System.TypeLoadException
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.
Exception stack trace:
at System.Web.Http.WebHost.HttpControllerRouteHandler.System.Web.Routing.IRouteHandler.GetHttpHandler (System.Web.Routing.RequestContext requestContext) [0x00000] in <filename unknown>:0 at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache (System.Web.HttpContextBase context) [0x00000] in <filename unknown>:0 at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache (System.Object o, System.EventArgs e) [0x00000] in <filename unknown>:0 at System.Web.HttpApplication+<RunHooks>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0 at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0 at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0
Version Information: 3.2.8 (tarball Sun Apr 13 00:36:52 FET 2014); ASP.NET Version: 4.0.30319.17020
Comment 1 Maxim 2014-04-26 08:39:00 UTC
To add MVC and Web API2 I used NuGet packages manager (so it is not absolutely manually of course).
Comment 2 Miguel de Icaza [MSFT] 2014-05-23 10:22:10 UTC
You are using binaries not compiled with MOno, so you are referencing a library that we do not provide.

The right fix would be to upgrade our aspnetstack, but I do not know when that would happen.