I have two hubs in my application. For the one I need NTLM authentication, while IP based filtering for the other. For this to work I need to setHttpListener.AuthenticationSchemestoAuthenticationSchemes.Ntlmfor
the first, while it remains Anonymous for the other. This means that I can not have both hubs running on the same listener connection. I have myOwinMiddlewareto handle the authorisation, and I am trying to set up two
different endpoints for these two hubs (two different ports).
My problem is that I don't know how to tell SignalR to map only a specific hub to specificIAppBuilder, and not all hubs that it can find. I have found several methods to do the same with
ApiControllers, but nothing for SignalR.
It seems, that I have found at least two solutions. I started to write an article about them: https://www.codeproject.com/Tips/1237940/One-Possible-Way-of-Selectively-Assigning-Hubs-to
None
0 Points
2 Posts
How can I map only specific hubs in SignalR
Mar 30, 2018 07:25 AM|ZorgoZ|LINK
I have two hubs in my application. For the one I need NTLM authentication, while IP based filtering for the other. For this to work I need to set
HttpListener.AuthenticationSchemes
toAuthenticationSchemes.Ntlm
for the first, while it remains Anonymous for the other. This means that I can not have both hubs running on the same listener connection. I have myOwinMiddleware
to handle the authorisation, and I am trying to set up two different endpoints for these two hubs (two different ports).My problem is that I don't know how to tell SignalR to map only a specific hub to specific
IAppBuilder
, and not all hubs that it can find. I have found several methods to do the same withApiController
s, but nothing for SignalR.Thank you!
None
0 Points
10 Posts
Re: How can I map only specific hubs in SignalR
Mar 30, 2018 03:31 PM|Underground|LINK
Other than just breaking them out into separate projects I'm not sure if you could do that within the framework of SignalR.
If there is a way I'd be curious to know as well.
None
0 Points
2 Posts
Re: How can I map only specific hubs in SignalR
Apr 17, 2018 05:26 PM|ZorgoZ|LINK