Debian Sid,单声道 3.0。我正在尝试运行 mvc 应用程序(它在将单声道升级到 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 简单网页,它适用于 mono 2.10。但升级到 3.0 后它就不再工作了。
最佳答案
您需要为该文件添加一个符号链接(symbolic link)
# 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
关于c# - Mono 3.0/Debian/asp.net - 找不到方法 : 'System. Configuration.IConfigurationSectionHandler.Create,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16583114/