Bug 23925 - MVC 4 Application on Linux server using Mono 3.2.3 System.Net.Http Assembly Error
Summary: MVC 4 Application on Linux server using Mono 3.2.3 System.Net.Http Assembly E...
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Configuration ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-10-20 01:56 UTC by Dharmesh
Modified: 2016-04-16 09:28 UTC (History)
2 users (show)

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:

Description Dharmesh 2014-10-20 01:56:57 UTC

i have hosting MVC 4 application on Linux. i have try with simple one page application then its work's 
fine but when i add System.Net.Http DLL reference to my application then i get below exception.


Invalid IL code in System.Net.Http.Headers.MediaTypeHeaderValue:.ctor (string): method body is empty.

Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Net.Http.Formatting.
Exception stack trace:
  at System.Net.Http.Formatting.MediaTypeConstants..cctor () [0x00000] in <filename unknown>:0 
Version Information: 3.2.3 ((no/8d3b4b7 Tue Sep 23 14:47:41 IST 2014); ASP.NET Version: 4.0.30319.17020
My Server Details is as per below :

Linux server : Debian

Mono Version : 3.2.3


Thanks in advance.
Comment 1 Marek Safar 2016-04-16 09:28:14 UTC
You are using reference assembly instead of actual execution assembly