I have installed parallel Mono (2.11.3) following these instructions: http://www.integratedwebsystems.com/2012/04/install-mono-2-11/ Now I want to run my ASP.NET site on this Mono instance. I have created an empty MVC 4 site using the "Internet site" template in VS 2010 and published it to the Linux box running Mono.
I have succeeded in running it via xsp4 following these instructions ( http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/) to set up the environment variables prior to running xsp4. It works without major problems (I see that some new features, like CSS bundling, do not work, but I will deal with it later).
Now, I would like to use the production server like apache or nginx. However, it seems almost impossible, and it seems that I'm not the only one with this problem. For example, using this simple nginx configuration
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;
}
}
results in 502 Bad Gateway error, and the log file says "upstream sent unexpected FastCGI record: 3 while reading response header from upstream". As for the Apache + mod_mono_server4, I have not moved past the error
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
There are a lot of posts on this topic, even here on the Stackoverflow, but no real answers. However, some users do report that they succeeded in running MVC4 sites on mono with these servers, so I was wondering if anybody would like to share their configuration settings or step-by-step instructions?