-
Notifications
You must be signed in to change notification settings - Fork 457
Migrate AdminPanel and MapApp from Blazor Server App to Blazor Web App #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
sven-n
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work yet. I started the Startup project and opened the admin panel in the browser. It can't get some static web assets:
GET
http://localhost/css/site.css
[HTTP/1.1 404 Not Found 4ms]
GET
http://localhost/MUnique.OpenMU.Web.AdminPanel.styles.css
[HTTP/1.1 404 Not Found 0ms]
GET
http://localhost/_content/Blazored.Modal/blazored-modal.css
[HTTP/1.1 404 Not Found 0ms]
GET
http://localhost/_content/Blazored.Modal/blazored.modal.js
[HTTP/1.1 404 Not Found 4ms]
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
Fixed in commit 74fc606. The issue was that App.razor files were using incorrect paths for static assets. In the new Blazor Web App pattern, the App.razor component doesn't have access to Razor Page helpers like Changes made:
The static assets should now load correctly. |
sven-n
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The page opens, but it's not functional. We have now the following errors when loading the AdminPanel page:
GET
http://localhost/_content/Blazored.Modal/blazored-modal.css
[HTTP/1.1 404 Not Found 8ms]
GET
http://localhost/_content/Blazored.Modal/blazored.modal.js
[HTTP/1.1 404 Not Found 47ms]
GET
http://localhost/_content/MUnique.OpenMU.Web.AdminPanel/_content/Blazored.Toast/Blazored.Toast.bundle.scp.css
[HTTP/1.1 404 Not Found 2ms]
GET
http://localhost/_content/MUnique.OpenMU.Web.AdminPanel/_content/Blazored.Modal/Blazored.Modal.bundle.scp.css
[HTTP/1.1 404 Not Found 2ms]
GET
http://localhost/_content/MUnique.OpenMU.Web.AdminPanel/_content/MUnique.OpenMU.Web.ItemEditor/MUnique.OpenMU.Web.ItemEditor.jwdwu43srf.bundle.scp.css
[HTTP/1.1 404 Not Found 2ms]
GET
http://localhost/_content/MUnique.OpenMU.Web.AdminPanel/_content/Microsoft.AspNetCore.Components.QuickGrid/Microsoft.AspNetCore.Components.QuickGrid.boiwgh0w5b.bundle.scp.css
[HTTP/1.1 404 Not Found 1ms]
GET
http://localhost/_content/MUnique.OpenMU.Web.AdminPanel/_content/MUnique.OpenMU.Web.Shared/MUnique.OpenMU.Web.Shared.c0g0rwfzu1.bundle.scp.css
[HTTP/1.1 404 Not Found 1ms]
Co-authored-by: sven-n <5238610+sven-n@users.noreply.github.com>
The issue is caused by a conflict between two requirements:
The workaround prevents the manifest from being generated properly, causing the 404 errors. Temporary Solution:
Permanent Solution (requires further work):
Commits d0256fc attempted to fix paths and middleware order, but the root cause is the missing manifest file. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot can you review my changes? |
I've reviewed your changes in commit f8c8be5. Here's my assessment: ✅ Good Changes1. Proper Blazor Web App Structure
2. Asset Management Improvements
3. Router Configuration
|
|
Okay, I added the missing |
Migration Plan: Blazor Server App to Blazor Web App ✅
WebApplicationExtensions.csin AdminPanel to use new Blazor Web App APIsWebApplicationExtensions.csin MapApp to use new Blazor Web App APIsDapr/Common/Extensions.csConfigureDaprService method_Host.cshtmland_Layout.cshtmlfilesCurrent Issue
The static web assets from NuGet packages (Blazored.Modal, Blazored.Toast, etc.) are returning 404 errors. Investigation shows:
FixNetSdkDiscoverAssetsBugworkaround in csproj files may be interferingWorking on solution to ensure NuGet package assets are served correctly from host applications.
Build Status: ✅ Passing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.