Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.26k stars 261 forks source link

Using Finbuckle BasePathStrategy with a Blazor Server-side app doesn't work #501

Open paburgos opened 2 years ago

paburgos commented 2 years ago

Hello,

I managed to use Finbuckle using Host Strategy in a Blazor Server App .NET 6. And it works really well!

However, when changing to WithBasePathStrategy I get a "Sorry, there's nothing at this address." the default message when the route is not found.

Can you provide an example in how to implement the Base Path Strategy in Blazor?

AndrewTriesToCode commented 2 years ago

hi @paburgos I'm glad to hear that the host strategy works, but the basepath strategy is a bummer. I honestly don't have enough experience with Blazor to be of much help. I believe Blazor has its own internal routing that happens and I don't think it runs the entire application pipeline on route changes -- this is something that would be a big benefit to the library so I will plan to look into it.

paburgos commented 2 years ago

@AndrewTriesToCode thanks! looking forward to seeing this new feature in the library.

Bouke commented 1 year ago

In order to achieve this, you need to host Blazor at a path that includes the tenant. For example:

endpoints.MapBlazorHub("{tenant}/_blazor");
gocampo commented 7 months ago

Hello,

I managed to use Finbuckle using Host Strategy in a Blazor Server App .NET 6. And it works really well!

However, when changing to WithBasePathStrategy I get a "Sorry, there's nothing at this address." the default message when the route is not found.

Can you provide an example in how to implement the Base Path Strategy in Blazor?

Hi @paburgos , could you provide some working code of Finbuckle and Blazor Server with host strategy? TIA