How to resolve TypeError: Failed to fetch dynamically imported module: _framework/dotnet.js #53636
Unanswered
manivenkit
asked this question in
Q&A
Replies: 3 comments
-
I have the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same here! |
Beta Was this translation helpful? Give feedback.
0 replies
-
same issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had a Blazor Server project which was running on .Net Core 7.0. I moved it to .Net 8.0 Blazor Web App, manually all files and dependencies and resolved all the incompatibilities between Server and WASM, and then tried to set
it on Interactive Auto render mode.
Then I set up the IIS to run my website exactly how it was working on Server project. But when I run the application, I get the follwing error, TypeError: Failed to fetch dynamically imported module: /_framework/dotnet.js
Initially I thought maybe the base URL could the issue but then this should have caused my CSS and blazor.web.js to also error out, but it was properly set to the application under the Default Web Site.
If I publish the site and run the application, I don't get this error. If instead of IIS, I use IIS Express the application runs without the above TypeError.
If this code runs from IIS the error is generated but if I use the IISExpress, it works without any issue, and I find that dotnet.js has been loaded, which means there should be some IIS configuration issue maybe but am not able to pinpoint the error to a particular issue. And not sure if that’s related to the case, the app runs very sluggish in debug mode, if I change the render mode to interactive server the application is very fast. On IISExpress the app is equally fast. I publish the project and it works fine off the IIS, so even that’s not the issue. All this is on a local machine, but pretty much same even when on my remote server.
So, what exactly is happening here and how to rid this error? Or does it mean, dotnet.js will not load during Debug session through IIS? If so, what could be the rationale behind this?
(version .Net 8.0.1)
Edit:
[April 30, 2024] - Updated to .Net 8.0.4, facing the same problem.
Beta Was this translation helpful? Give feedback.
All reactions