C# HTTP错误500.30-ANCM进程内启动失败-生产环境
我正在为部署配置应用程序。我所做的第一步是将环境从开发更改为生产,并在这个错误中绊倒。我注意到我只能在开发环境中启动我的应用程序。当我将它们更改为Staging时,我得到了提到的错误。此外,我尝试了这方面的解决方案,但仍然没有成功 以下是相关配置: launchSettings.jsonC# HTTP错误500.30-ANCM进程内启动失败-生产环境,c#,asp.net-core,asp.net-core-mvc,C#,Asp.net Core,Asp.net Core Mvc,我正在为部署配置应用程序。我所做的第一步是将环境从开发更改为生产,并在这个错误中绊倒。我注意到我只能在开发环境中启动我的应用程序。当我将它们更改为Staging时,我得到了提到的错误。此外,我尝试了这方面的解决方案,但仍然没有成功 以下是相关配置: launchSettings.json { "$schema": "http://json.schemastore.org/launchsettings.json", "iisSettings": { "windowsAuthenti
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:64845",
"sslPort": 44375
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
},
"BingoAPI": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
}
}
}
xx.csproj
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
netcoreapp3.0
除了web.config和完整的项目文件外,您可能还需要共享Startup.cs和Program.cs。如果您想将ASPNETCORE\u环境设置为生产状态,只需从launchSettings.json
中删除environmentVariables
。我注意到应用程序可以与服务器上的生产环境一起运行。我猜这是一些操作系统相关的东西,所以我就这样离开了