SignalR.Owin vs. SignalR.SelfHost
Asked Answered
M

2

11

I want to use SignalR selfhosted with Owin.

What are the differences between these two packages:

Microsoft ASP.NET SignalR OWIN

and

Microsoft ASP.NET SignalR Self Host

When to use one or other?

Manos answered 29/1, 2016 at 17:9 Comment(0)
M
3

I think the main difference is, that Microsoft ASP.NET SignalR OWIN is an older package, because it depends on Microsoft.AspNet.SignalR.Core (>= 1.2.2). And Microsoft ASP.NET SignalR Self Host depends on Microsoft.AspNet.SignalR.Core (>= 2.2.0). That is why I will use the Microsoft ASP.NET SignalR Self Host package.

Manos answered 31/1, 2016 at 10:7 Comment(0)
T
10

Microsoft ASP.NET SignalR Self Host still uses OWIN to startup. The only difference is that the Self Hosted SignalR server doesn't need to be nested in an ASP.NET web application hosted in IIS. It can be a simple console application.

See MSDN for more info:

Reasons for not hosting in IIS include:

  • Environments where IIS is not available or desirable, such as an existing server farm without IIS.
  • The performance overhead of IIS needs to be avoided.
  • SignalR functionality is to be added to an exising application that runs in a Windows Service, Azure worker role, or other process.
Transpolar answered 29/1, 2016 at 18:26 Comment(3)
I know the reasons for not hosting in IIS. That's why I want to self host SignalR. But both linked packages are for self host. I don't understand the differences of these two. Both are using OWIN.Manos
It is because the Self Host dll includes HttpListener which is needed to listen on port 80, and since that's the job of IIS in the first place, this class is needed for a connection to be made with SignalR because you are not using IIS.Preoccupation
Microsoft has segmented the SignalR into multiple NuGet packages so that you can use the correct package according to your needs, that way you reduce unnecessary dependenciesPreoccupation
M
3

I think the main difference is, that Microsoft ASP.NET SignalR OWIN is an older package, because it depends on Microsoft.AspNet.SignalR.Core (>= 1.2.2). And Microsoft ASP.NET SignalR Self Host depends on Microsoft.AspNet.SignalR.Core (>= 2.2.0). That is why I will use the Microsoft ASP.NET SignalR Self Host package.

Manos answered 31/1, 2016 at 10:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.