我正在按照本指南来托管我的 Blazor WebAssembly 项目:https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/webassembly?view=aspnetcore-3.1#rewrite-urls-for-correct-routing
我已经安装了 URL Rewrite 模块 2.1,但我仍然收到此错误:
HTTP Error 500.19 - Internal Server Error
Error Code: 0x8007000d
Config File \\?\C:\MyProject\web.config
我将物理路径指向 wwwroot 上一级,即发布后项目的根文件夹。
我在根文件夹中的 web.config 如下所示:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyProject.Server.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
我错过了什么?我安装了 .NET Core 3.1.202。我的项目是基于默认模板构建的。意思是 ASP.NET Core 托管的服务器部分和 WebAssembly 驱动的客户端部分。我正在为 IIS 站点使用端口 81。
感谢任何指导
最佳答案
通过安装 ASP NET Core 托管模块解决:https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1
关于asp.net - IIS 8 上的 Blazor WebAssembly - 0x8007000d,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61764740/