最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - Blazor WebAssembly Standalone: Failed to load resource: the server responded with a status of 404 (Not Found) - manifest.we

programmeradmin2浏览0评论

I created a Blazor WebAssembly standalone application by choosing the appropriate template in VS 2022 Community, targeting .NET 8.0. And I didn't change anything in it. I just wanted to try to host it locally on IIS, and I've done it by publishing the app to the folder first.

And then copy-pasted the content of wwwroot to the web site that I created under C:\inetpub\wwwroot\BlazorTest.

So, I think that I've done all the standard things, but I am getting an error when trying to open the web site

An unhandled error has occurred

And when I inspect the error in Google Chrome, I can see a list of errors like this:

I tried to Google the answer but with no success so far, additionally all this files with 404 status are actually there, so none is missing from the publish folder.

What could be the problem here?

I created a Blazor WebAssembly standalone application by choosing the appropriate template in VS 2022 Community, targeting .NET 8.0. And I didn't change anything in it. I just wanted to try to host it locally on IIS, and I've done it by publishing the app to the folder first.

And then copy-pasted the content of wwwroot to the web site that I created under C:\inetpub\wwwroot\BlazorTest.

So, I think that I've done all the standard things, but I am getting an error when trying to open the web site

An unhandled error has occurred

And when I inspect the error in Google Chrome, I can see a list of errors like this:

I tried to Google the answer but with no success so far, additionally all this files with 404 status are actually there, so none is missing from the publish folder.

What could be the problem here?

Share Improve this question edited yesterday Zhi Lv 21.5k1 gold badge27 silver badges37 bronze badges asked Feb 16 at 18:56 vldmrrdjccvldmrrdjcc 2,1325 gold badges23 silver badges44 bronze badges 2
  • are you creating new site in iis or application under default website? – Jalpa Panchal Commented Feb 17 at 10:21
  • @JalpaPanchal I created new site by right clicking Sites in IIS -> add new site, so not default web site. – vldmrrdjcc Commented Feb 17 at 13:11
Add a comment  | 

1 Answer 1

Reset to default 1

It turned out that I was missing Asp Net Core Hosting Bundle:

"The .NET Core Hosting bundle is an installer for the .NET Core Runtime and the ASP.NET Core Module. The bundle allows ASP.NET Core apps to run with IIS."

https://learn.microsoft/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-9.0

Once I installed that and restarted IIS suddenly everything starts to work!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论