Conversation
Copilot
AI
changed the title
[WIP] Blazor WASM Standalone .webmanifest 404 error
Add .webmanifest MIME type mapping to Blazor WASM web.config template
Sep 26, 2025
Co-authored-by: javiercn <[email protected]>
01e5e63 to
4cf8e8b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds MIME type configuration for .webmanifest files to the Blazor WebAssembly web.config template, fixing 404 errors that occur when PWA applications are deployed to IIS servers.
Changes:
- Added
.webmanifestfile extension to the IIS MIME type mappings in the Blazor WASM web.config template - Used the MIME type
application/manifest+jsonto match the SDK's ContentTypeProvider definition
This was referenced Jan 22, 2026
akoeplinger
approved these changes
Jan 26, 2026
ilonatommy
approved these changes
Jan 26, 2026
Member
|
@javiercn should we backport this to 10.0? |
This was referenced Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue where Blazor WebAssembly PWA applications deployed to IIS would encounter 404 errors when accessing
.webmanifestfiles due to missing MIME type configuration.Problem
When deploying Blazor WASM PWA applications to IIS, the generated
web.configfile was missing the necessary MIME type mapping for.webmanifestfiles. This caused IIS to return 404 errors when browsers attempted to fetch the web app manifest, breaking PWA functionality.The issue affects all Blazor WASM PWA applications deployed to IIS servers, as the default web.config template in the SDK didn't include support for this file type that was re-included in .NET 10.
Solution
Added the missing MIME type mapping to the
BlazorWasm.web.configtemplate:<remove fileExtension=".webmanifest" />- Removes any existing IIS default mapping to prevent conflicts<mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" />- Maps.webmanifestfiles to the correct MIME typeThe MIME type
application/manifest+jsonwas chosen to:ContentTypeProvider.csTesting
This fix ensures that Blazor WASM PWA applications work correctly on IIS without requiring developers to manually customize their web.config files.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.