[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
 
Hi,

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 
outdated).


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.Configuration.IConfigurationSectionHandler.Create'.
  at 
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection 
(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 
unknown>:0 
  at Mono.WebServer.XSP.Server+ApplicationSettings..ctor () [0x00000] in 
<filename unknown>:0 
xsp4
Listening on address: 0.0.0.0
Root directory: /var/www/stage.fernansoft.net
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Missing method 
System.Configuration.IConfigurationSectionHandler::Create(object,object,XmlNode) 
in assembly /usr/local/lib64/mono/4.0/System.dll, referenced in assembly 
/usr/local/lib64/mono/4.0/System.Configuration.dll
Missing method System.Configuration.ConfigurationManager::get_AppSettings() in 
assembly 
/usr/local/lib64/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll, 
referenced in assembly 
/usr/local/lib64/mono/gac/Mono.WebServer2/0.4.0.0__0738eb9f132ed756/Mono.WebServer2.dll
Missing method System.Configuration.ConfigurationManager::get_AppSettings() in 
assembly 
/usr/local/lib64/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll, 
referenced in assembly /usr/local/lib64/mono/4.0/System.Web.dll
Missing method System.Configuration.ConfigurationManager::get_AppSettings() in 
assembly 
/usr/local/lib64/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll, 
referenced in assembly /usr/local/lib64/mono/4.0/System.Web.dll
Missing method 
System.Configuration.ConfigurationProperty::.ctor(string,Type,object,TypeConverter,ConfigurationValidatorBase,ConfigurationPropertyOptions) 
in assembly 
/usr/local/lib64/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll, 
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
http://lists.ximian.com/mailman/listinfo/mono-list


-------------- 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