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

Fernando Rodriguez frodriguez.developer at outlook.com
Tue Sep 16 04:40:41 UTC 2014


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


More information about the Mono-list mailing list