2013-05-16 26 views
6

Debian Sid,Mono 3.0。我試圖運行mvc應用程序(它在將單聲道升級到3.0之前工作)。這是拋出異常:單聲道3.0/Debian/asp.net - 未找到方法:'System.Configuration.IConfigurationSectionHandler.Create

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-單服務器4來自:

#!/bin/sh 
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.0/mod-mono-server4.exe" "[email protected]" 

要:

#!/bin/sh 
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/mod-mono-server4.exe" "[email protected]" 

不幸的是,沒有這樣的文件:/usr/lib/mono/4.5/mod-mono-server4.exe(/usr/lib/mono/4.5/目錄中沒有這樣的文件)。

你有什麼想法是什麼錯?我的應用程序是ServiceStack簡單的網頁,它適用於單聲道2.10。但升級到3.0後,它不再工作。

回答

7

您需要添加一個符號鏈接該文件

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

這樣,它仍然會使用MOD-單server4.exe但與4.5 dll的

+0

謝謝,它解決了這個問題。看起來Debian軟件包中沒有這個符號鏈接。 – user1209216

+0

我在openSUSE中遇到了同樣的問題。 – nickvane

+0

任何想法爲什麼這整個過程必須完成?我還沒有更新我的應用程序以使用.NET 4.0,而Mono 3.0導致我的應用程序崩潰。做出這些修改解決了這個問題,但我不明白爲什麼。 – Brian

相關問題