We are developing a “Portal” type app with Blazor and we want to be able to have several “projects” (for exampleintegrations or forms) that sit on other URLs. (Think like azure web apps)
so we might have
Portal.ourcompany.com – our portal app, which has a menu + header etc, and loads razor pages as part of the page in a separate container. This app is a client side webassembly app. We use .net 8.
then we might have https://ourcompanyintegrationapp.azurewebsites.net/ that provides a razor page that should be loaded into the container, while keeping menu and header (not reloading the whole page). so eg. I navigate to portal.ourcompany.com/integration1 and it would load the remote page from the azure function into the container.
There of course needs to be auth between the 2 (we use oauth2) (but Im pretty sure we know that bit)
Now I can see how to do this if we switch URLs and load whole page again, but thats not quite what we want.
any thoughts on how to do this? (if its even possible?)
I thought blazor routing could do this, but it appears Im wrong…
What we can do,** but do not want:
**
to move “seamlessly” between pages/urls keeping auth etc.
to keep same url and load a remote page using YARP
**What we want: **
to load the externally sourced .razor page into the container within the webassembly app without reloading the whole page.
In essence like having a “native” iframe.
Jussi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.