I host the ServiceStack web service on Apache with mod-mono, I have mono-3.0.0 and xsp-2.10.2. I posted a welcome sample focused on the .NET Framework 2.0 and using mod-mono-server2, and it worked fine. Then I change the project to the target .Net framework 4.0 and using mod-mono-server4. I get this error:
Failed to load file or assembly "System.Web.Extensions, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" or one of its dependencies. The system cannot find the specified file.
System.IO.FileNotFoundException: Failed to load file or assembly "System.Web.Extensions, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" or one of its dependencies. The system cannot find the specified file. File name: 'System.Web.Extensions, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' in System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000 ] at: 0 at System.AppDomain.Load (System.String assemblyString) [0x00000] at: 0 at (wrapper remoting-invoke-with-check) System.AppDomain: Load (string) in System.Reflection.Assembly.Load ( System.String assemblyString) [0x00000] at: 0 in System.Web.Compilation.BuildManager.LoadAssembly (System.Web.Configuration.AssemblyInfo info, System.Collections.Generic.List`1 al) [0x00000] at: 0 in System .Web.Compilation.BuildManager.GetReferencedAssemblies () [0x00000] at: 0 in System.Web.Compilation.BuildManager.CallPreStartMethods () [0x00000] at: 0
But the System.Web.Extensions file is installed in the GAC:
gacutil -l System.Web.Extensions
The following assemblies are installed in the GAC: System.Web.Extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 System.Web.Extensions, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 System.Web.Extensions, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 Number of elements = 3
Even if I installed MonoPath specifically to get version 4.0, the same error occurs:
MonoPath / usr / local / lib / mono / 4.0
I also noticed this:
Version Information: Mono Runtime Version: 2.10.5 (tarball Fri Oct 28 10:20:24 IST 2011); ASP.NET Version: 4.0.30319.1
The version of Mono Runtime says 2.10.5, although I have mono-3.0.0 installed, I donβt know if this information is of value to this problem.
I tried to run mod-mono-server4 directly, and I received this error message:
mono server mod4
mono-server mod4 There is no System.Configuration.IConfigurationSectionHandler :: Create method (object, object, XmlNode) in assembly / usr / local / lib / mono / 4.0 / System.dll, assembly reference / usr / local / lib / mono / 4.0 / System. Configuration.dll Exception while reading a configuration file: System.MissingMethodException: method not found: 'System.Configuration.IConfigurationSectionHandler.Create'. in System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] at: 0 in System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in .Configuration.ConfigurationManager.get_AppSettings () [0x00000] at: 0 in Mono.WebServer.Apache.Server.get_AppSettings () [0x00000] at: 0 in Mono.WebServer.Apache.Server + ApplicationSettings..ctor () [0x00000] to: 0 mod-mono server 4 Listening: / tmp / mod_mono_server Root directory: / usr / local / bin Error: the server / tmp / mod _mono_server is already listening there
I searched for this error and searched for this error:
https://bugzilla.xamarin.com/show_bug.cgi?id=7967
Maybe the error in mod-mono-server4 is the source of another error ... I will try to get xsp 3.0 and see if it solves the problem.
Any ideas?
thanks