Problem after upgrading to version 4.0.0 on Ubuntu

I just upgraded to just released Mono 4.0.1 on my ubuntu machines. The previous installed version of mono was 3.2.7 (if I remember correctly).

Now the problem:

My first issue is about SignalR and self-hosting. I have a .NET 4.5.1 console app where I host NancyFx, Web Api and SignalR myself using OWIN. There were no problems when running on mono 3.2.7, but when I try to run the application on mono 4.0.1 I get the following stack trace:

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidProgramException: Invalid IL code in (wrapper delegate-invoke) <Module>:invoke_callvirt_CancellationTokenRegistration_CancellationToken&_Action`1<object>_object (System.Threading.CancellationToken&,System.Action`1<object>,object): IL_0057: castclass 0x00000007

  at Microsoft.AspNet.SignalR.Infrastructure.CancellationTokenExtensions.SafeRegister (CancellationToken cancellationToken, System.Action`1 callback, System.Object state) [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeResolverDispose (IDependencyResolver resolver, CancellationToken hostShutdownToken) [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeHost (IDependencyResolver resolver, System.String instanceName, CancellationToken hostShutdownToken) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.UseSignalRMiddleware[HubDispatcherMiddleware] (IAppBuilder builder, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.RunSignalR (IAppBuilder builder, Microsoft.AspNet.SignalR.HubConfiguration configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions+<>c__DisplayClass1.<MapSignalR>b__0 (IAppBuilder subApp) [0x00000] in <filename unknown>:0 
  at Owin.MapExtensions.Map (IAppBuilder app, PathString pathMatch, System.Action`1 configuration) [0x00000] in <filename unknown>:0 
  at Owin.MapExtensions.Map (IAppBuilder app, System.String pathMatch, System.Action`1 configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.MapSignalR (IAppBuilder builder, System.String path, Microsoft.AspNet.SignalR.HubConfiguration configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.MapSignalR (IAppBuilder builder, Microsoft.AspNet.SignalR.HubConfiguration configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.MapSignalR (IAppBuilder builder) [0x00000] in <filename unknown>:0 

      

I don't know what this error might mean and I am grateful for any help. I am using Microsoft ASP.NET SignalR Self Host package version 2.2.0.

And as a side note, I've compiled all my builds in a new mono version.

Regards, Simon

+3


source to share


1 answer


This turned out to be a Mono issue that was recently fixed: https://bugzilla.xamarin.com/show_bug.cgi?id=29665



+3


source







All Articles