Dylan v.d Merwe - 283 - Apr 7, 2014

Is it possible in IIS to host ServiceStack web services and have a SignalR hub in the same project? I have a whole bunch of REST services that a mobile app uses and want to add a chat SignalR hub to the same project.

paolo ponzano:

Hello Dylan, yes it’s possible… I’ve done it last week… you just have to add to SignalR Startup that piece of code

  public void Configuration(IAppBuilder app)
        {
            // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
             app.MapSignalR("/signalr", new HubConfiguration());
             
            var serviceStackAppHost =new AppHost();

            serviceStackAppHost.Init();
        }

since SignalR uses Owin to start and not WebActivator

Dylan v.d Merwe:

Ah man high five!
__________

Stephen Brannan:

+Dylan v.d Merwe Also check this stackoverflow post out too. If you have ServiceStack handler being used on your whole site you may need to do this too. http://stackoverflow.com/questions/22483650/servicestack-and-signalr-together-in-same-project/22549657#22549657