HTTP错误500.19-内部服务器错误:无法访问请求的页面,因为该页面的相关配置数据无效

发布于 2025-01-23 11:58:15 字数 742 浏览 7 评论 0原文

我正在尝试在本地发布.NET 6 Blazor WebAssembly WASM WASM在IIS上,

我正在使用Windows 10上的Visual Studio 2022

我使用.NET 6托管捆绑包,

我使用的是,我正在使用带有带有Visual Studio的默认Blazor Web组件模板 当我导航到LocalHost时,没有修改

,我会收到http 509.1错误,该错误指示错误的web.config

(image) http错误509.1

这是我的web.config:

(image)web.config

如果我评论重写部分如下:

(image web)web.config,带有有问题的线条评论

iis不再引发例外,但是它将我发送到默认的IIS页面,

任何想法如何解决这个问题?

I'm trying to publish a .NET 6 Blazor WebAssembly WASM locally to IIS

I'm using Visual Studio 2022 on Windows 10

I have the .NET 6 hosting bundle installed

I'm using the default Blazor Web Assembly template installed with Visual Studio with no modifications

When I navigate to localhost I get the HTTP 509.1 Error, which indicates a malformed web.config

(Image) HTTP Error 509.1

Here is my web.config:

(Image) web.config

If I comment out the rewrite section as follows:

(Image) web.config with offending lines commented out

IIS no longer throws an exception, however it sends me to the default IIS page

Any ideas how to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

公布 2025-01-30 11:58:15

确保在服务器上安装了.NET核心运行时和托管捆绑包。您可以从Microsoft网站下载它们。确保安装与ASP.NET Core应用程序的目标框架相对应的正确版本。

Ensure that the .NET Core Runtime and Hosting Bundle are installed on the server. You can download them from the Microsoft website. Make sure you install the correct version corresponding to the target framework of your ASP.NET Core application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文