Bug 33809 - Exception with SignalR 2.2 and Mono 4.2.0
Summary: Exception with SignalR 2.2 and Mono 4.2.0
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 4.2.0 (C6)
Hardware: Other Linux
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
URL:
Depends on:
Blocks:
 
Reported: 2015-09-08 23:56 UTC by brian leung
Modified: 2016-01-29 09:43 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description brian leung 2015-09-08 23:56:29 UTC
SignalR 2.x uses OWIN and requires the implementation of the method System.Web.HttpApplication.RegisterModule(), which is already done in Mono 4.2.0.

However, there is another exception when I tried to run the SignalR 2.x Tutorial project with Mono 4.2.0.  Details:
https://github.com/luckyus/mono420_signalR2.git

This is the SignalR 2.x tutorial project I used:
http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr

Thank you.
Comment 1 Rodrigo Kumpera 2015-09-09 15:59:34 UTC
Hey Marcos,

Could look into this one?
Comment 2 brian leung 2015-12-24 09:33:02 UTC
I just tried the new 4.2.1, the still got the same problem.

Please Help.

Thank You.
Comment 3 Adam Chu 2016-01-06 23:24:18 UTC
I'm experiencing the same issue. Anyone know whether this will be an easy fix or whether I should switch to an older version of SignalR?

Thanks everyone.
Comment 4 marcus 2016-01-11 07:17:21 UTC
I try to run the Microsoft simplest SignalR example. I have same issue too. Are there any hotfix ?
Thanks
Comment 5 marcos.henrich 2016-01-27 11:09:30 UTC
Hi Brian,

Sorry for the delay.

I looked at the tutorial and your mono420_signalR2 repo.

Are you building the solution on visual studio and running it on linux with mono?

All sorts of problems can occur when mono tries to run binaries compiled against .NET class libraries.

SignalR repo https://github.com/SignalR/SignalR seems to have a solution called Microsoft.AspNet.SignalR.Mono.sln that should build something suitable to ran with mono.
Comment 6 marcos.henrich 2016-01-27 11:29:47 UTC
So I opened the solution that is in the tutorial in Xamarin Studio, built it and then ran xsp4 and I am getting the same error when I open it on the browser.

I will have to look further into it.
Comment 7 marcos.henrich 2016-01-28 17:55:59 UTC
Below is a pull request that fixes the exception in Microsoft.Owin. 

https://github.com/mono/mono/pull/2531

I tried to run SignalRChat with the fix, the exception no longer occur but the script in signalr/hub never finishes loading.

If the new issue is another bug on System.Web it will need to be pin pointed by someone with a deeper knowledge of SignalR.
Comment 8 marcos.henrich 2016-01-29 09:43:52 UTC
Fixed in mono/master d56d04602506540487506d0ee9875a635090877c
https://github.com/mono/mono/commit/d56d04602506540487506d0ee9875a635090877c

Fixed in cycle 7 mono/mono-4.3.2-branch 98f0a7b39a8e7b74620bff1de2bf14ed42936810
https://github.com/mono/mono/commit/98f0a7b39a8e7b74620bff1de2bf14ed42936810