I suggest you ...

Deeper SignalR Integration

I'd like to see a deeper integration between ServiceStack and SignalR. Here are a few ideas that I've so far ran into...

1. A Hub Authorization Attribute which implements IAuthorizeHubConnection and/or IAuthorizeHubMethodInvocation.

2. Some sort of JsonServiceClient integration with HubConnections. Maybe automatically associating Cookies with a new HubConnection. Plus exception handling wrappers (i.e. Like an Unauthorized exception is thrown within a SignalR exception).

3. Centralized documentation outlining what needs to be changed in the web.config for SignalR to co-exist with ServiceStack. Also why the UseBufferedStream property should be enabled for SignalR.

4. This might require a separate feature request but an updated example app showing SignalR 2.0 integrated with ServiceStack 4.x. Only Examples I've seen have been with SignalR 1.x

142 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Stephen Brannan shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
started  ·  AdminDemis J Bellot (Developer, ServiceStack) responded  · 

The way ServiceStack and SignalR will be able to integrate in future will be through .NET Core’s IApplicationBuilder pipeline which by design supports running multiple frameworks within the same App that can now share the same default route namespace.

From the v4.5.2, ServiceStack now supports running on .NET Core, please see the guide in the full release notes which shows how to register ServiceStack’s AppHost in .NET Core: http://docs.servicestack.net/releases/v4.5.2.html

SignalR for .NET Core has yet to be released but it’s expected you’ll be able to access SignalR via its dependencies registered in .NET Core’s Startup which will also be injected in your Services like normal IOC dependencies.

We’ll update this feature request again with an example showing a demo of ServiceStack + SignalR together in the same App once SignalR is available on .NET Core in 2017.


Sign in
Password icon
Signed in as (Sign out)
  • Rob Vermeulen commented  ·   ·  Flag as inappropriate

    Is there a working implementation for this yet? I am running into a lot of problems ("user ID required", routing issues etc..) when combining SignalR and ServiceStack in .NET core.

  • AdminDemis J Bellot (Developer, ServiceStack) commented  ·   ·  Flag as inappropriate

    The integrated ServiceStack solution for real-time events is to use Server Events.

    But if preferred you can happily configure SignalR in the same .NET Core App as ServiceStack, neither framework has dependencies or knowledge of each other but they both have access to the same dependencies registered in .NET Core's IServiceCollection.

  • Johan Mulder commented  ·   ·  Flag as inappropriate

    This is awesome news ! Luv the idea that Rest api , signalr and server sent events can be fully integrated in SS. What will be absolutely awesome is Rest , SignalR , SSE and Akka.net
    That will put SS on a different planet ;)

  • Anonymous commented  ·   ·  Flag as inappropriate

    Note that authenticated SSE isn't supported in IE9 and earlier browsers. In other browsers that don't support XmlHttpRequest to send http cookies and/or custom headers it cannot be implemented either.
    Sadly to say, for this reason we are forced to leave SSE toward SignalR.

  • Jonas Bohlin commented  ·   ·  Flag as inappropriate

    We're using SignalR and we're seriously considering moving to ServiceStack for our api v2. But we'd like to keep using signalr for some operations, and here's why:
    Server Sent Events are virtually unusable if you're serving content to iOS-devices. iOS only allows a small number of concurrent connections to any server, and an SSE endpoint blocks one of those connections, resulting in other requests not being allowed through. WebSockets doesn't cause this, on the other hand.

  • Ryan Britton commented  ·   ·  Flag as inappropriate

    you mention in your comment that the SSE integration extends to the client libraries - how is this accessible, Demis? I can only see info for javascript clients....

Feedback and Knowledge Base