Code Monkey home page Code Monkey logo

Comments (26)

einari avatar einari commented on June 14, 2024

Just to elaborate a bit more. I'm trying to run SignalR on Mono on OSX, and the main problem is the Microsoft.Web.Infrastructure dependency, it crashes due to some registry things that assembly is doing internally.

Looking at the source code of SignalR this might be possible to work out. I'll see if I can get the time to create a patch for it.

from signalr.

Schlurcher avatar Schlurcher commented on June 14, 2024

I just wan't to voice my support for this idea, but there's not much I can do to help. :)

I'm running mono 2.10 on debian and
a) If using a Hub signalr/hubs 404's
b) PersistentConnections are stuck on connect

Not much more I can report on that matter.

from signalr.

satishasdion avatar satishasdion commented on June 14, 2024

My +1 for adding Mono support for SignalR

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

We can revisit this now that signalr is decoupled from ASP.NET.

from signalr.

moberg avatar moberg commented on June 14, 2024

+1 for Mono support

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Hey guys, can someone take the lead on this? I'm not a mono expert and it would be great if someone with mono experience can take a look at it. The refactored source should be alot easier to play with.

from signalr.

einari avatar einari commented on June 14, 2024

Sure. I can at least start by compiling it and identifying if there still is an issue. Let me do that later tonight (CET) and give you my findings.

from signalr.

einari avatar einari commented on June 14, 2024

Got through the compile hurdle - the only thing I needed to fix to be able to compile was the Bind() method inside DefaultActionResolver. The Serializer only has the generic version of the ConvertToType() method. From the context it looks like you're trying to just deserialize into an object of a given type - changing this to

return Newtonsoft.Json.JsonConvert.DeserializeObject(value.ToString (), type);

Should then suffice.

But, I'm struggling with the Microsoft.Web.Infrastructure DLL which everything I can see from the interwebs is pointing to not using the one from Nuget, but use the one built into Mono - but I can't find that in Mono on my Mac - I'm running the latest (2.10.8). So if anyone could shed some light on this - I can then carry on.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Mono should work with self host. I think there's still some issues with the Asp.Net side of it but I haven't tried it in a while.

from signalr.

bojanv55 avatar bojanv55 commented on June 14, 2024

I tried this on mono, but got Exception at line where it needs System.Web.Hosting.IIS7WorkerRequest.

There is no such class on MONO?

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

What exception did you get?

from signalr.

yojimbo87 avatar yojimbo87 commented on June 14, 2024

+1 for mono support

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Instead of everyone typing +1, it'd be way more helpful if someone that actually used mono could chip in and see what fails. BTW self host works fine on mono.

from signalr.

einari avatar einari commented on June 14, 2024

Finally got the time I was talking about a couple of months ago.

These are my findings with the latest code base.

AspNetShutDownDetector:

  • HostingEnvironment.RegisterObject() is not implemented, so this crashes. But I commented it out to get to the real problems.

Next is :

System.NotImplementedException: The requested feature is not implemented.
at System.Web.HttpContextWrapper.GetService (System.Type serviceType) [0x00000] in :0
at SignalR.Hosting.AspNet.AspNetResponse.RemoveAcceptEncoding () [0x00000] in /Users/einari/Projects/SignalR/SignalR.Hosting.AspNet/AspNetResponse.cs:72

In the ReflectedHubDescriptorProvider just running the Hosting.AspNet.Sample I get this on line 30 (_hubs.Value.TryGetValue()) :
Could not load type 'Elmah.Assertions.JScriptAssertion+EvaluationStrategy' from assembly 'Elmah, Version=1.2.13605.0, Culture=neutral, PublicKeyToken=null'.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Finally, some real issues to look at 😄

  1. We can probably detect it and not blow up
  2. This also looks fixable. We can check for the interface and code more defensively.
  3. Not sure what that one is. Can you dig into that a bit more?

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

@einari How did you get SignalR working on mono with Asp.NET?

from signalr.

einari avatar einari commented on June 14, 2024

The biggest hurdle was the Microsoft.Web.Infrastructure.dll. If you just remove it from the bin folder and set the build action to not copy it local, since this is built into Mono. So what I've done locally is to create Mono versions of the CSProj files so we can set Mono specific options.

I'll investigate further on the Elmah problem. Just need to finish something for a client.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

@einari I want to get it running myself on mono and I'm making changes in the mono branch. I'm using monodevelop and mono 2.10.9. Where did you find out how to ever get it running?

from signalr.

einari avatar einari commented on June 14, 2024

I can't remember exactly how I figured it out, its a while back actually, but for a different project. I remember just reading about it somewhere on a forum or StackOverflow.

If you pull in my fork on the Mono branch, it should compile and run with MonoDevelop : https://github.com/einari/signalr/tree/Mono

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

OK, I'm just going to keep hacking on it. Having new projects specifically for mono seems like the suck 😄. I've made a bunch of changes to the asp.net host that should play nicer with mono.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Haven't done the RegisterObject part as yet.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

This should be fixed now. Delete elmah from the bin folder and it should work. I'll deeper into why that assembly fails to be loaded.

from signalr.

einari avatar einari commented on June 14, 2024

Totally agree, way better without a specific mono project file. What is probably possible is to have the reference set up twice in the project file with platform conditionals and then configure one of them to not copy it locally.

I'll get your changes and dive into the Elmah thing.

from signalr.

tlnagy avatar tlnagy commented on June 14, 2024

@davidfowl and @einari SignalR should be compatible with mono atm correct? If not I would love to contribute.

from signalr.

davidfowl avatar davidfowl commented on June 14, 2024

Yes it works with mono now.

Sent from my Windows Phone
From: tamaslnagy
Sent: 4/21/2012 7:13 PM
To: David Fowler
Subject: Re: [SignalR] Mono support (#58)
@davidfowl and @einari SignalR should be compatible with mono atm
correct? If not I would love to contribute.


Reply to this email directly or view it on GitHub:
#58 (comment)

from signalr.

tlnagy avatar tlnagy commented on June 14, 2024

Fantastic. Thanks!

from signalr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.