dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.35k stars 9.99k forks source link

Using SignalR with Finbuckle Multitenant library #17328

Closed williambowsher closed 4 years ago

williambowsher commented 4 years ago

I am trying to use SignalR in a ASP.NET Core 2.2.7 application that uses the Finbuckle Mutlitenant library.

Finbuckle allows me to specify a Route template with a tenant placeholder like routes.MapRoute("default", "{__tenant__}/{controller=Home}/{action=Index}/{id?}");

I tried the following configure.MapHub<ComplianceHub>("/{__tenant__}/complianceHub");

But this does not work, as it would appear the MapHub url needs to be a static URL for the Javascript client to connect to.

Would it be possible to apply a template to the MapHub url?

Or would it be best to move my SignalR implementation to a standalone microservice that gets called by the Javascript client with the required tenant data?

williambowsher commented 4 years ago

Ok I have got it working now by using a separate micro service, but if there is any information about using a route template for the hub URL i would be very interested.