Closed yugabe closed 9 months ago
@yugabe thanks for contacting us.
You need to map every app in its own virtual path subfolder. (app1, app2, and so on). Otherwise you get conflicts (which is expected).
While some files are identical (and harmless) it won't be the case for things like dlls, etc. which are actually different between apps.
Thanks @javiercn for the answer.
I would expect that to be the case, yes, however, seeing as this conflict already happens in the template app when using Auto render mode (for example), and the Error page specifically being rendered correctly first on the server then overwritten on the client with the "Not found" text, I believe there are some holes left in the current design that should be considered.
I also expect it would be a useful and common use-case for many that a Blazor WASM app and a Blazor Server (/static) app could be hosted side-by-side. Multiple WASM apps would certainly cause conflicts, but not when WASM and Server are being hosted together, I assume.
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.
See our Issue Management Policies for more information.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Currently, when registering multiple component roots like so:
, there will be a late-appearing runtime error because serving "/_framework" files will be handled by both and an
AmbiguousMatchException
will prevent both roots from being able to be served side-by-side.It's unclear if the above is supported or not, but the related source seems to imply it will/would be:0
The problem is very visible in the default Blazor Web App template's
Error.razor
page when using WebAssembly. The page gets rendered statically on server-side, then gets overwritten by theRouter
'sNotFound
RenderFragment
of the WebAssembly app, which can't resolve the/Error
route, as that's only available on the server.The new unified model doesn't allow for different pages to describe different interactivity at different levels of the DOM hierarchy. However, because of the above limitation, it's also not possible to register different pages or routes to different interactivity scenarios manually either.
A current workaround is:
/_framework
endpoints.The second part is particularly hard to overcome by developers, as there are no currently available public APIs that allow only registering the page routes (and not the
/_framework
static files and opaque endpoint).Describe the solution you'd like
Define how multiple interactivity modes can be hosted side-by-side. Allow registering multiple roots (and don't register the
/_framework
assets multiple times).Directly related to this, fix the app templates to allow for hosting both SSR and CSR components so that they "just work", as the problem can be seen with the current
Error.razor
page.Additional context
The error, specifically: