[Mono-list] Running ASP.Net 4.5 MVC Application on Mono

Jeff Bonhag jbonhag at SCA-CORP.COM
Tue Sep 16 13:53:08 UTC 2014

Hi Fernando,

I'm working on a port of a WCF application from .NET 4.0 to Mono, and I
have seen this kind of error many times.  I haven't found conclusive
solution, and we've probably been over all the same Stack Overflow
articles. :)

That being said, deleting the System.*.dll assemblies from the project's
bin directory sometimes works.

I've also had this error because of a malformed Web.config.

Honestly, though, I don't have a solid answer -- usually I just peck
at the keyboard until the problem goes away.  It's a terrible debugging
strategy, but what works one day doesn't seem to work the next.

Jeff Bonhag

-----Original Message-----
From: mono-list-bounces at lists.ximian.com on behalf of Fernando Rodriguez
Sent: Tue 9/16/2014 12:40 AM
To: mono-list at lists.ximian.com; mono-aspnet-list at lists.ximian.com
Subject: [Mono-list] Running ASP.Net 4.5 MVC Application on Mono

I'm trying to get an Asp.Net 4.5 MVC app to run on mono and I'm getting the 
error shown bellow (also posted here). I get the same error in apache using 
mod_mono as in xsp4. I built mono, xsp, and mod_mono on the server from the 
latest tarball releases (simple ./configure && make && make install). Other 
Asp.Net applications run fine on the same server (targetting earlier runtimes). 
The server run Gentoo and I remove all mono, xsp, and mod_mono packages before 
building the source.

I found several posts that suggest a bug in xsp (don't apply since I'm using 
latest tarball and also tried earlier versions) or mono loading the wrong 
framework version stack trace and exception message suggest is loading the 
right assemblies (most assemblies on the 4.5 directory are symlinks to 4.0). I 
did tried to run xsp.exe with mono ---runtime=v4.5 and it tells me it's not 
available, same for 4.0 but it is available and the and the exception shows 
it's using it.

The application was built on Windows with Visual Studio but I also built on 
MonoDevelop (Xamarin) on Windows to target Mono. It does not use any external 
references except for PayPal's API Library but I used this same library on 
other applications that run on mono so that shouldn't be the problem. I'm 
trying to setup a parallel mono environment on a Linux desktop to compile it 
on Linux to see if it makes a difference (my distro's version are really 

Another thing I noticed is that Visual Studio copies all the Mvc and Razor, 
etc assemblies to the bin folder, if I delete them mono wines about not finding 
them even though there's Mono's implementation on the GAC (which I believe are 
built from the same source). Also in the Visual Studio generated Web.config the 
<httpRuntime> and other tags had a targetFramework="4.5" attribute, and I had 
to remove it cause mono wined about it (unrecognized attribute or something 
like that). Yet the same Web.config works fine in Mono under Windows.

I think that's all I got, suggestions are appreciated.

Exception caught during reading the configuration file:
System.MissingMethodException: Method not found: 
(System.String configKey) [0x00000] in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.GetSection (System.String 
sectionName) [0x00000] in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000] in 
<filename unknown>:0 
  at Mono.WebServer.XSP.Server.get_AppSettings () [0x00000] in <filename 
  at Mono.WebServer.XSP.Server+ApplicationSettings..ctor () [0x00000] in 
<filename unknown>:0 
Listening on address:
Root directory: /var/www/stage.fernansoft.net
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Missing method 
in assembly /usr/local/lib64/mono/4.0/System.dll, referenced in assembly 
Missing method System.Configuration.ConfigurationManager::get_AppSettings() in 
referenced in assembly 
Missing method System.Configuration.ConfigurationManager::get_AppSettings() in 
referenced in assembly /usr/local/lib64/mono/4.0/System.Web.dll
Missing method System.Configuration.ConfigurationManager::get_AppSettings() in 
referenced in assembly /usr/local/lib64/mono/4.0/System.Web.dll
Missing method 
in assembly 
referenced in assembly /usr/local/lib64/mono/4.0/System.Web.dll

Fernando Rodriguez
frodriguez.developer at outlook.com
Mono-list maillist  -  Mono-list at lists.ximian.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20140916/a8e5c185/attachment.html>

More information about the Mono-list mailing list