无法运行asp.net核心项目

时间:2020-08-22 23:21:42

标签: asp.net-core asp.net-core-webapi

这是我的launchsettings.json

{
 "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
  "applicationUrl": "http://localhost:62868",
  "sslPort": 44324
}
},
 "profiles": {
"IIS Express": {
  "commandName": "IISExpress",
  "launchBrowser": true,
  "launchUrl": "weatherforecast",
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
},
"AspNetCoreApi": {
  "commandName": "Project",
  "launchBrowser": true,
  "launchUrl": "weatherforecast",
  "applicationUrl": "https://localhost:5001;http://localhost:5000",
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
 }
}
}

运行应用程序时出现错误检测到ASP.NET设置,该设置不适用于集成托管管道模式。

最可能的原因: system.web/identity@impersonate设置为true。

在IIS中,我尝试将Asp.Net模拟设置为默认网站的禁用状态

仍然没有运气。

更新1

这是我的csproj文件

<Project Sdk="Microsoft.NET.Sdk.Web">

 <PropertyGroup>
   <TargetFramework>netcoreapp3.1</TargetFramework>
 </PropertyGroup>

 <ItemGroup>
   <ProjectReference Include="..\LoggerService\LoggerService.csproj" />
 </ItemGroup>


</Project>

1 个答案:

答案 0 :(得分:0)

我设法通过在根级别禁用IIS中的Asp.Net Impresonation来修复它

enter image description here