Blazor Server - Request For Help With Issue #82
Hainesworld
started this conversation in
General
Replies: 1 comment
-
Using Blazor with AuthP (in fact any backend database) is difficult. The approach that people recommend (see issue #38) is a Web API backend and a WASM frontend. Someone wanted to build and example Web API / Blazor WASM to go in this repo, but its a lot of work and we haven't one yet. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Jon,
First of all thank you for a fantastic library of code, for all the work you've put into it, and for sharing it with the community.
I'm using the current latest version of AuthP (4.1.0) in an ASP.NET Core Blazor Server project using AuthP roles/permissions, multi-tenants and sharding, basically starting with your Example 6. I've so far implemented Tenants and Sharding (shardingsettings.json) CRUD.
I have discovered a problem and I need your help please. I think it might be to do with the difference between scoped services in Blazor and those in your example. Specifically, a scoped service in MVC Web App lasts for just the duration of the call whereas in Blazor it lasts for the entire duration of the circuit.
The problem I'm experiencing is this: Once I have successfully added a DatabaseInformation to shardingsettings.json and move from the Sharding page to the Tenants page to add a new Tenant, the new Connection Name does not appear in IShardingConnections.GetAllPossibleShardingData(). It does in your example. It only appears if reconnect the browser, thus creating a new circuit. This suggests that IShardingConnections only reads shardingSettings.json when it is first created.
Do I understand this correctly?
What can I do to fix this? I didn't want to go altering your code until I have a firm understanding of the issue. Might there possibly be further issues related to scope that are waiting to trip me up?
Here's hoping you can help.
Best regards, Steve
Beta Was this translation helpful? Give feedback.
All reactions