Blazor WebAssembly caching on IIS

746 views Asked by At

I have migrated my Blazor project from net5 to net6.

However, I get the following error when launching the website:

Uncaught (in promise) error: could not find class: Microsoft.AspNetCore.Components.WebAssembly.Hosting:EntrypointInvoker in assembly Microsoft.AspNetCore.Components.WebAssembly

I have learned from https://github.com/dotnet/aspnetcore/issues/38436 that I might have an issue with caching the blazor.webassembly.js in the browser.

The file blazor.webassembly.js should be served without caching it (cache-control: no-cache).

However, the file is not served with the corresponding header:

enter image description here

It is not a blazor webassembly .NET Core hosted, but a simple static website, hosted with IIS. Is there a specific setting on IIS or elsewhere that I am missing?

0

There are 0 answers