Dotnet Core 3.1 HTTP错误500.19-内部服务器错误

问题描述 投票:1回答:1

我正在尝试使用“ ASP.NET Core Web应用程序”在Visual Studio 2019中使用dotnet core 3.1创建简单的(默认)Web API。

一旦创建了(默认)应用程序,并且我能够在IIS Express上运行它,只需在Visual Studio中按F5。

然后我要发布,因此我转到Windows功能并打开IIS,然后通过安装“ WebPlatformInstaller_x64_en-US.msi”“ dotnet-hosting-3.1.2-win.exe”对其进行配置。 >(对于点网核心)。

然后我在命令提示符下运行以下命令:

net stop was /y
net start w3svc

我使用“默认网站/测试”

配置指向主机:http://localhost和带有DotNet Core 3.1的自包含包。还用

“无托管代码”

]创建了一个应用程序池Application Pool

[我去http://localhost/Test

我收到以下错误消息:

Error Message

这里是我的

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=".\TestApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" /> </system.webServer> </location> </configuration> <!--ProjectGuid: 63addee1-2c1f-4679-94f4-df9dc952d8f9-->
我不确定这是否是相关信息,当我在IIS中进行传递身份验证测试时,我得到以下信息:

Pass-through Authentication Test Results

我尝试了许多不同的发布方式,但最终它们都收到了以上错误消息。我们该如何解决?

我正在尝试使用“ ASP.NET Core Web应用程序”在Visual Studio 2019中使用dotnet core 3.1创建一个简单(默认)Web API。创建(默认)应用程序后,我便可以运行它了...

IMO,我会告诉您看一下本演练:

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1

尝试检查系统(服务器)上是否激活了Windows Process Activation Service(WAS)。

打开stdoutLogEnabled =“ true”以从应用程序的日志文件中获取更多详细的错误。或在Startup.cs类中打开“开发人员错误页面”。

asp.net .net asp.net-core core
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.