2

I am using visual studio 2022, wasm + hosted site project, the default boiler plate. I am publishing it to iis server and i get the following error.

enter image description here

I am clueless as why such an error is occuring. I can see the file doenet.timezones.blat in the framework folder but unable to browse in the browser. I get

enter image description here

Has some one hosted the blazor application in the IIS server manually? I am banging my head with this error and I could not get past it. Kindly help

Venkat
  • 1,702
  • 2
  • 27
  • 47
  • does adding `app.UseBlazorFrameworkFiles();` do the trick? – clamchoda Sep 30 '22 at 18:42
  • The server project program.cs has this app.UseBlazorFrameworkFiles(); – Venkat Sep 30 '22 at 18:45
  • @Venkay did you see identical issue here? https://github.com/dotnet/aspnetcore/issues/29433#issuecomment-765674335 – clamchoda Sep 30 '22 at 18:48
  • i saw, but there is no solution to it. It says clean the obj folder, bin folder and deploy it again. – Venkat Sep 30 '22 at 18:51
  • no. this one answers this question dotnet.timezones.blat returns 404 – Venkat Aug 24 '23 at 15:57
  • To be clear, the text from my comment above is auto-generated. This is 100% a duplicate of that one, which is a canonical for this problem. Multiple answers on the target cover MIME types, and the 404 error you mention is merely a downstream symptom of the error message about file integrity. – TylerH Aug 24 '23 at 18:43

1 Answers1

4

After a lot of trying, I found that .blat and .dat extensions were missing in the MIME types so I did the following:

Open the IIS Manager, Click on the machine name(root dir) Right side click on MIME type and add the following values

enter image description here

enter image description here

and voila ! the error disappeared. I really sweated it out, i dont want others to suffer the same frustration i went through!

Venkat
  • 1,702
  • 2
  • 27
  • 47