mono 4.0 xsp4 and mod_mono: method arguments are incompatible

601 views Asked by At

I've have a fresh install of Ubuntu server 11.10 with mono and and mod_mono and I'm trying to get a asp.net site running (requiring .net 4.0) but all I get is this really unhelpful stack trace:

Server Error in '/' Application

method arguments are incompatible

Description: HTTP 500. Error processing request.

Stack Trace:

System.ArgumentException: method arguments are incompatible
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure, Boolean allowClosed) [0x00000] in <filename unknown>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplicationFactory.AddHandler (System.Reflection.EventInfo evt, System.Object target, System.Web.HttpApplication app, System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplicationFactory.AttachEvents (System.Web.HttpApplication app) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x00000] in <filename unknown>:0 

Version information: Mono Runtime Version: 2.10.5 (Debian 2.10.5-1); ASP.NET Version: 4.0.30319.1

Anyone have any ideas on how to debug this or find out what is actually causing this? If there a more detailed log somewhere?

1

There are 1 answers

0
jakobandersen On

I assume that you are running in Debugging mode as specified on:

ASP Debugging

To do the same with the Apache mod_mono module, use the MonoDebug true directive in your apache configuration file.

That is you do the following:

MonoSetEnv MonoDebug true

typically in your httpd.conf file. Depending on your OS and how you obtained mono to start with you might need to get debugging symbols from somewhere to have the actual files mentioned in the stacktrace. Usually they are called mono-core-debuginfo but it depends on your system.