Mono 3.0 / Debian / asp.net - 找不到方法:'System.Configuration.IConfigurationSectionHandler.Create

时间:2013-05-16 08:59:31

标签: c# asp.net asp.net-mvc linux mono

Debian Sid,Mono 3.0。我正在尝试运行mvc应用程序(它在将mono升级到3.0之前有效)。这是抛出的异常:

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 

我还发现了从/ usr / bin / mod-mono-server4进行更改的提示:

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

要:

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

不幸的是,没有这样的文件:/usr/lib/mono/4.5/mod-mono-server4.exe(/usr/lib/mono/4.5/目录中没有这样的文件)。

你有什么想法吗?我的应用程序是ServiceStack简单网页,它适用于单声道2.10。但升级到3.0后它不再起作用了。

1 个答案:

答案 0 :(得分:7)

您需要为该文件添加符号链接

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

这样它仍然会使用mod-mono-server4.exe但是使用4.5 dll的