You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say we have a main blazor-server application "For clients" and we would like to add an area "For admins" (or maybe n more areas).
Each area may have different static files (.js, .css, ...)
Approaches considered:
Throw everything inside single project and control everything using roles (decorate admin pages with "Admin" role attribute)
Create completely different blazor-server project for each desired area
Try to hook up razor class library as an area. I tried to create second host file in "Areas/Admin/Pages/_Host.cshml" file for "/Admin" path (in main application), which loads App component from separate razor component class library. All routing works fine, but I get "Error: Failed to complete negotiation with the server: Error".
Additional scenarios:
We should be able to access desired areas by direct link (ourapp.com/admin) or a mapped domain (ourdomain.com which is mapped to ourapp.com/admin)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say we have a main blazor-server application "For clients" and we would like to add an area "For admins" (or maybe n more areas).
Each area may have different static files (.js, .css, ...)
Approaches considered:
Additional scenarios:
We should be able to access desired areas by direct link (ourapp.com/admin) or a mapped domain (ourdomain.com which is mapped to ourapp.com/admin)
So what is the right approach to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions