当前位置: 首页 > 知识库问答 >
问题:

NET Core 3.1-HTTP错误500.30-ANCM进程内启动失败

羊越
2023-03-14

我将我的项目从.NET core 2.2升级到3.1,该项目在visual studio 2019中运行良好,问题发生在临时服务器上,它提示错误“HTTP错误500.30-ANCM进程内启动失败”。如果我将托管模型更改为outofprocess,它就可以正常工作。

如有任何帮助或建议,我们将不胜感激,谢谢。

.NET Core SDK (reflecting any global.json):
 Version:   3.1.200
 Commit:    c5123d973b

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.200\

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

.NET Core SDKs installed:
  2.1.402 [E:\Program Files\dotnet\sdk]
  2.2.207 [C:\Program Files\dotnet\sdk]
  3.1.101 [C:\Program Files\dotnet\sdk]
  3.1.102 [C:\Program Files\dotnet\sdk]
  3.1.200 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.4 [E:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.4 [E:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.4 [E:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
[aspnetcorev2.dll] Initializing logs for 'C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll'. Process Id: 4200.. File Version: 13.1.20018.2. Description: IIS ASP.NET Core Module V2. Commit: c3acdcac86dad91c3d3fbc3b93ecc6b7ba494bdc.
[aspnetcorev2.dll] Resolving hostfxr parameters for application: '.\WebApplication1.exe' arguments: '' path: 'E:\TEST1\'
[aspnetcorev2.dll] Known dotnet.exe location: ''
[aspnetcorev2.dll] Process path '.\WebApplication1.exe' is not dotnet, treating application as standalone or portable with bootstrapper
[aspnetcorev2.dll] Checking application.dll at 'E:\TEST1\.\WebApplication1.dll'
[aspnetcorev2.dll] Checking hostfxr.dll at 'E:\TEST1\.\hostfxr.dll'
[aspnetcorev2.dll] hostfxr.dll found app local at 'E:\TEST1\.\hostfxr.dll', treating application as portable with launcher
[aspnetcorev2.dll] Resolving absolute path to dotnet.exe from 'dotnet'
[aspnetcorev2.dll] Invoking where.exe to find dotnet.exe
[aspnetcorev2.dll] where.exe invocation returned: 'E:\Program Files\dotnet\dotnet.exe
C:\Program Files\dotnet\dotnet.exe
C:\Program Files (x86)\dotnet\dotnet.exe
'
[aspnetcorev2.dll] Current process bitness type detected as isX64=1
[aspnetcorev2.dll] Processing entry 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2.dll] Binary type 6
[aspnetcorev2.dll] Found dotnet.exe via where.exe invocation at 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2.dll] Resolving absolute path to hostfxr.dll from 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2.dll] hostfxr.dll located at 'E:\Program Files\dotnet\host\fxr\2.1.4\hostfxr.dll'
[aspnetcorev2.dll] Parsed hostfxr options: dotnet location: 'E:\Program Files\dotnet\dotnet.exe' hostfxr path: 'E:\Program Files\dotnet\host\fxr\2.1.4\hostfxr.dll' arguments:
[aspnetcorev2.dll] Argument[0] = 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2.dll] Argument[1] = 'E:\TEST1\.\WebApplication1.dll'
[aspnetcorev2.dll] Loading hostfxr from location E:\Program Files\dotnet\host\fxr\2.1.4\hostfxr.dll
[aspnetcorev2.dll] Canceling standard stream pipe reader
[aspnetcorev2.dll] Loading request handler:  'C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\3.1.2\aspnetcorev2_inprocess.dll'
[aspnetcorev2.dll] Creating handler application
[aspnetcorev2_inprocess.dll] Initializing logs for 'C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\3.1.2\aspnetcorev2_inprocess.dll'. Process Id: 4200.. File Version: 13.1.20018.2. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: c3acdcac86dad91c3d3fbc3b93ecc6b7ba494bdc.
[aspnetcorev2_inprocess.dll] Waiting for initialization
[aspnetcorev2_inprocess.dll] Starting in-process worker thread
[aspnetcorev2_inprocess.dll] Resolving hostfxr parameters for application: '.\WebApplication1.exe' arguments: '' path: 'E:\TEST1\'
[aspnetcorev2_inprocess.dll] Known dotnet.exe location: 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2_inprocess.dll] Process path '.\WebApplication1.exe' is not dotnet, treating application as standalone or portable with bootstrapper
[aspnetcorev2_inprocess.dll] Checking application.dll at 'E:\TEST1\.\WebApplication1.dll'
[aspnetcorev2_inprocess.dll] Checking hostfxr.dll at 'E:\TEST1\.\hostfxr.dll'
[aspnetcorev2_inprocess.dll] hostfxr.dll found app local at 'E:\TEST1\.\hostfxr.dll', treating application as portable with launcher
[aspnetcorev2_inprocess.dll] Resolving absolute path to hostfxr.dll from 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2_inprocess.dll] hostfxr.dll located at 'E:\Program Files\dotnet\host\fxr\2.1.4\hostfxr.dll'
[aspnetcorev2_inprocess.dll] Parsed hostfxr options: dotnet location: 'E:\Program Files\dotnet\dotnet.exe' hostfxr path: 'E:\Program Files\dotnet\host\fxr\2.1.4\hostfxr.dll' arguments:
[aspnetcorev2_inprocess.dll] Argument[0] = 'E:\Program Files\dotnet\dotnet.exe'
[aspnetcorev2_inprocess.dll] Argument[1] = 'E:\TEST1\.\WebApplication1.dll'
[aspnetcorev2_inprocess.dll] Setting environment variable ASPNETCORE_IIS_HTTPAUTH=anonymous;
[aspnetcorev2_inprocess.dll] Setting environment variable ASPNETCORE_IIS_PHYSICAL_PATH=E:\TEST1\
[aspnetcorev2_inprocess.dll] Loading hostfxr from location E:\Program Files\dotnet\host\fxr\2.1.4\hostfxr.dll
[aspnetcorev2_inprocess.dll] Initial Dll directory: '', current directory: 'c:\windows\system32\inetsrv'
[aspnetcorev2_inprocess.dll] Setting dll directory to c:\windows\system32\inetsrv
[aspnetcorev2_inprocess.dll] Setting current directory to E:\TEST1\
[aspnetcorev2_inprocess.dll] Managed threw an exception -1073741819
[aspnetcorev2_inprocess.dll] Starting shutdown sequence 1
[aspnetcorev2_inprocess.dll] Clr thread wait ended: clrThreadExited: 1
[aspnetcorev2_inprocess.dll] Canceling standard stream pipe reader
[aspnetcorev2_inprocess.dll] Event Log: 'Application '/LM/W3SVC/7/ROOT' with physical root 'E:\TEST1\' hit unexpected managed exception, exception code = '0xc0000005'. Please check the stderr logs for more information.' 
End Event Log Message.
[aspnetcorev2_inprocess.dll] Stopping in-process worker thread
[aspnetcorev2_inprocess.dll] Stopping CLR
[aspnetcorev2_inprocess.dll] Event Log: 'Application '/LM/W3SVC/7/ROOT' with physical root 'E:\TEST1\' failed to load coreclr. Exception message:
CLR worker thread exited prematurely' 
End Event Log Message.
[aspnetcorev2_inprocess.dll] InvalidOperationException 'CLR worker thread exited prematurely' caught at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\inprocessapplication.cpp:420 
[aspnetcorev2_inprocess.dll] Failed HRESULT returned: 0x8007023e at F:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\dllmain.cpp:131 
[aspnetcorev2_inprocess.dll] Starting app_offline monitoring in application 'E:\TEST1\'
[aspnetcorev2_inprocess.dll] Starting file watcher thread

更新:我已经找到了根本原因,主机包3.1安装在C驱动器上,而2.1.4安装在E驱动器上。系统一直指向E驱动器,所以我不得不在E驱动器上修正安装,问题就解决了。

共有1个答案

黄弘盛
2023-03-14

在我的例子中,是因为我的appsetting.json有一个json对配置无效,我得到了这个错误。检查应用程序中使用的jsons。

连接字符串上的\无效。

 类似资料: