Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4297

Loading module from “.../_framework/dotnet.js” was blocked because of a disallowed MIME type (“text/html”)

$
0
0

My project runs fine on local host, but when I publish a Blazor WebAssembly app to Azure I get:

Loading module from “https://aistorybuilderstest.azurewebsites.net/_framework/dotnet.js” was blocked because of a disallowed MIME type (“text/html”).aistorybuilderstest.azurewebsites.netLoading failed for the module with source “https://aistorybuilderstest.azurewebsites.net/_framework/dotnet.js”. aistorybuilderstest.azurewebsites.net:73:52Uncaught (in promise) Error: Failed to start platform. Reason: TypeError: error loading dynamically imported module: https://aistorybuilderstest.azurewebsites.net/_framework/dotnet.js    mn https://aistorybuilderstest.azurewebsites.net/_framework/blazor.webassembly.js:1

This project ran fine on Azure for months and I only made a small change to a .razor file. I had also upgraded the Nuget packages but I rolled back all those changes and it still wont work.

I created a new Blazor WebAssembly project and published to Azure and it also wont work.

It just shows:

enter image description here

I restored a back-up of a project that works and compared the files and I see that in the project that does not work the Dotnet.js files are missing.

enter image description here

Why are they missing? I have no idea :( I am running the latest Visual Studio Version 17.9.6

If I run the project locally the dotnet.js file is there and loads:

enter image description here


Viewing all articles
Browse latest Browse all 4297

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>