Stephen Brannan - 509 - Dec 18, 2013

I’ve been researching the use of SignalR with ServiceStack and the examples don’t seem to focus on the setup of SignalR with ServiceStack. From everything I can tell they are mostly independent of each other and contained their own http handlers under asp.net. I was trying to following the example in https://github.com/paaschpa/ordersDemo but it doesn’t show where it initializes SignalR. Only how it’s being called.

Am I missing something?

This might be off topic, but is it really as simple as using the assembly attribute OwnStartup ?

Right they are independent projects with no code-sharing between them.

A good article showing how to use them together in the same project is at:
http://www.strathweb.com/2013/03/signalr-filters-and-servicestack/ 

Stephen Brannan:

Yup I found that article too, but it only discusses the usage of SignalR from with ServiceStack. It doesn’t talk about the setup or initialization of SIgnalR. I guess I’m just wanting confirmation that the lack of SignalR setup in the demo project is a error in that codebase and not something I’m misunderstanding.

Stefan Tsalapatis:

 a question also. Is there an easy way , like simple message queue in memory  to exchange structured messages the SignalR with ServiceStack ?

They’re both just C# libraries running in the same AppDomain, so just call into it as you would any other external library, e.g. you can access ServiceStack externally via the static HostContext class.

Stephen Brannan:

So I’m not misunderstanding that the demo project for ServiceStack with SignalR is not working correctly in regards to the SignalR?

Stephen Brannan:

Finally figured it out. That Demo app uses SignalR 1.0, which initializes SignalR using RouteTable.Routes.MapHubs in Application_Start. I had trouble realizing this since SignalR 2.0 is what all the tutorials reference now and the SignalR 2.0 initialization is completely different.