Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

Blazor WebAssembly PWA apps deployed to Azure fail to load manifest.webmanifest with 404 errors, preventing PWA installation. The IIS web.config lacks MIME type mapping for .webmanifest files.

Changes:

  • Added <remove fileExtension=".webmanifest" /> and <mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" /> to src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Wasm.web.config

The MIME type application/manifest+json follows the W3C Web App Manifest specification. Pattern matches existing file extension handling in the config (.json, .wasm, etc.).

Original prompt

This section details on the original issue you should resolve

<issue_title>Missing Manifest after azure deploy</issue_title>
<issue_description>### Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Vanilla Blazor WebAssembly-App gets started locally on the iis the manifest gets deployed correct. If the Blazor WebAssembly-App gets deployed on azure the manifest gets missing. Browser shows

Manifest fetch from https://-------------------------------.azurewebsites.net/manifest.webmanifest failed, code 404

Because its missing the application can`t start as PWA.

Expected Behavior

Manifest should be there and in correct place

Steps To Reproduce

Create Blazor WebAssembly-App with PWA, deploy to azure

Exceptions (if any)

workaround or fix

.NET Version

10

Anything else?

-</issue_description>

<agent_instructions>Do not build the repo locally, you won't be able to test this feature.

Update
https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Wasm.web.config to include the mime type.

Do not try to build or test, just make the change and send a PR</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix missing manifest after Azure deploy Add .webmanifest MIME type to Wasm.web.config for PWA support on Azure Nov 24, 2025
Copilot AI requested a review from javiercn November 24, 2025 18:05
Copilot finished work on behalf of javiercn November 24, 2025 18:05
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/cc: @maraf

@javiercn javiercn marked this pull request as ready for review November 24, 2025 18:06
Copilot AI review requested due to automatic review settings November 24, 2025 18:06
@javiercn javiercn force-pushed the copilot/fix-missing-manifest-azure-deploy branch from f18c35c to 04c11ae Compare November 24, 2025 18:06
Copilot finished reviewing on behalf of javiercn November 24, 2025 18:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds IIS MIME type configuration for .webmanifest files to enable PWA support for Blazor WebAssembly applications deployed to Azure. The change resolves 404 errors that prevent PWA installation when manifest files are not recognized by IIS.

  • Added MIME type mapping for .webmanifest files with application/manifest+json following W3C Web App Manifest specification
  • Follows existing IIS configuration pattern with <remove> followed by <mimeMap> entries

<mimeMap fileExtension=".dat" mimeType="application/octet-stream" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
<mimeMap fileExtension=".webmanifest" mimeType="application/manifest+json" />
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider enabling HTTP compression for .webmanifest files to improve load performance. Since the MIME type is application/manifest+json (JSON-based), these files are text-based and compress well.

Add the following line to the <httpCompression><dynamicTypes> section (around line 27):

<add mimeType="application/manifest+json" enabled="true" />

Note: While .json files (which use application/json) are not currently compressed in this config, enabling compression for manifest files would be beneficial as they are typically downloaded on initial page load for PWA functionality.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Manifest after azure deploy

2 participants