Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to deploy an ASP.NET MVC4 (MVC3 at least) application on Centos 6 server.

I've installed Mono 3.2.1, XSP4, mod_mono (for use with apache web server) and succesfully ran the test application that goes with mono. I used a config tool to create a config for app directory and deployed an empty ASP.NET WebPages project created in VS2012 on .Net 2.0 - it ran ok. But I need to run an .net 4.5 or at least 4.0 application, so I've set the MonoServerPath to mod-mono-server4 instead of mod-mono-server2 in the config, but now i'm getting a "Service Temporarily Unavailable" error while trying to access the asp.net project directory (even empty).

What should I check for?

Update: I checked the apache log and here what it shows:

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 /usr/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:208 
  at Mono.WebServer.Apache.Server+ApplicationSettings..ctor () [0x0002a] in /usr/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:63 
mod-mono-server4
Listening on: /tmp/mod_mono_server_Unreal
Root directory: /var/www/html/Unreal
Error: An exception was thrown by the type initializer for System.Net.Sockets.Socket
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 /usr/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:208 
  at Mono.WebServer.Apache.Server+ApplicationSettings..ctor () [0x0002a] in /usr/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:63 
mod-mono-server4
Listening on: /tmp/mod_mono_server_Unreal
Root directory: /var/www/html/Unreal
Error: An exception was thrown by the type initializer for System.Net.Sockets.Socket
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 /usr/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:208 
  at Mono.WebServer.Apache.Server+ApplicationSettings..ctor () [0x0002a] in /usr/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:63 
mod-mono-server4
Listening on: /tmp/mod_mono_server_Unreal
Root directory: /var/www/html/Unreal
Error: An exception was thrown by the type initializer for System.Net.Sockets.Socket
[Wed Sep 25 08:45:13 2013] [error] Failed to connect to mod-mono-server after several attempts to spawn the process.

Update 2

Well, after some googling i've found the solution..

To fix it u have to copy mod-mono-server4.exe from /opt/mono/lib/mono/4.0 (or wherever u've installed it) to /opt/mono/lib/mono/4.5 and then to edit mod-mono-server4 in /opt/mono/bin from

exec /opt/mono/bin/mono $MONO_OPTIONS "/opt/mono/lib/mono/4.0/mod-mono-server4.exe" "$@"

to

exec /opt/mono/bin/mono $MONO_OPTIONS "/opt/mono/lib/mono/4.5/mod-mono-server4.exe" "$@"
share|improve this question
    
You should answer your own question and mark it as answered, rather than editing the question. This was useful to me, although I almost missed the fact that an answer was in the question. –  Parrhesia Joe Nov 15 at 15:01

1 Answer 1

The answer was included as part of the question - just to clear up that it's answered I've copied and pasted it as a reply:

To fix it u have to copy mod-mono-server4.exe from /opt/mono/lib/mono/4.0 (or wherever u've installed it) to /opt/mono/lib/mono/4.5 and then to edit mod-mono-server4 in /opt/mono/bin from

exec /opt/mono/bin/mono $MONO_OPTIONS "/opt/mono/lib/mono/4.0/mod-mono-server4.exe" "$@" to

exec /opt/mono/bin/mono $MONO_OPTIONS "/opt/mono/lib/mono/4.5/mod-mono-server4.exe" "$@"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.