我已經按照以下說明安裝了並行單聲道(2.11.3):http://www.integratedwebsystems.com/2012/04/install-mono-2-11/現在我想在這個Mono實例上運行我的ASP.NET站點。我在VS 2010中使用「Internet站點」模板創建了一個空的MVC 4站點,並將它發佈到運行Mono的Linux框中。Mono 2.11 with nginx or apache
我已成功通過xsp4按照這些說明運行它(http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/),以在運行xsp4之前設置環境變量。它的工作原理沒有大問題(我發現一些新功能,比如CSS捆綁,不起作用,但我會在以後處理它)。
現在,我想使用生產服務器,如Apache或Nginx。但是,這似乎幾乎不可能,而且我似乎並不是唯一有這個問題的人。例如,使用這種簡單的nginx配置
server
{
listen 80;
server_name mvctest.mono;
access_log /var/www/mvctest/log/access.log;
error_log /var/www/mvctest/log/error.log debug;
location/
{
root /var/www/mvctest/;
index index.html index.htm default.aspx Default.aspx;
fastcgi_index /Home;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
}
}
導致502網關錯誤錯誤,日誌文件說「上游發送意想不到的FastCGI記錄:3,而從上游讀取響應標頭」。作爲爲Apache + mod_mono_server4,我沒有移動過去的錯誤
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() [0x00001] in /opt/mono-2.11/build/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:208
at Mono.WebServer.Apache.Server+ApplicationSettings..ctor() [0x0002a] in /opt/mono-2.11/build/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:63
有不少帖子對這個話題,甚至在這裏的#1,但沒有真正的答案。但是,有些用戶確實報告說他們成功地在這些服務器上運行單聲道MVC4站點,所以我想知道是否有人想分享他們的配置設置或分步指導?