Blazor pages from a Plugin #124040
Unanswered
coding-red-panda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've had a previous discussion here related to the
IServiceProvidernot loading a registered class correctly, and this was caused by DNNE and the ACL that Kestrel uses. Now I am running into what I believe to be a similar issue, and I was wondering if someone encountered this before, or has a better solution to what I am doing.The Setup
The main application is written in C++.
We use DNNE to load C# .NET 10 ClassLibraries as plugins to that application.
Each ClassLibary has a specific entrypoint that we call (Usually our
AppService) class to "start".One of these plugins starts a Kestrel webserver and is supposed to server Blazor pages.
The Issue
The out of the box setup for Kestrel manages to load the
MudBlazorcomponents and pages, but static assets such as the CSS and JS files from both MudBlazor and Blazor itself are not loaded/served by Kestrel.The Workaround
I need to do the following to make this all work:
The above allows me to actually work with MudBlazor, but it still fails to load the core Blazor functionality such as
blazor.web.jsTo make the latter work, I need to manually copy the assets after the build to include them in our package installer:
The above copies the output files to a shared folder, including all DLL dependencies etc.
I need to manually extract and copy the Blazor web JS file, otherwise Kestrel returns 404.
Can...someone explain why I need to do it this way, and Kestrel can't serve
blazor.web.jsdirectly?Isn't this file supposed to be a core thing of the Blazor package?
Beta Was this translation helpful? Give feedback.
All reactions