简体   繁体   中英

Mono 3.0/Debian/asp.net - Method not found: 'System.Configuration.IConfigurationSectionHandler.Create

Debian Sid, Mono 3.0. I'm trying to run mvc application (it worked before upgrading mono to 3.0). This is exception thrown:

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.Apache.Server.get_AppSettings () [0x00000] in <filename unknown>:0 
  at Mono.WebServer.Apache.Server+ApplicationSettings..ctor () [0x00000] in <filename unknown>:0 

I've also found tip to make change in /usr/bin/mod-mono-server4 from:

#!/bin/sh
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.0/mod-mono-server4.exe" "$@"

To:

#!/bin/sh
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/mod-mono-server4.exe" "$@"

Unfortunatelly, there is no such file: /usr/lib/mono/4.5/mod-mono-server4.exe (no such file in /usr/lib/mono/4.5/ directory).

Do you have any ideas what's wrong? My application is ServiceStack simple webpage and it works on mono 2.10. But it doesn't work anymore after upgrade to 3.0.

You need to add a symbolic link for that file

# ln -s /usr/lib/mono/4.0/mod-mono-server4.exe /usr/lib/mono/4.5/mod-mono-server4.exe

That way it will still use mod-mono-server4.exe but with the 4.5 dll's

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM