HTTP Error 500.30 - ANCM In-Process Start Failure


環境

  • windown 10
  • IIS 10
  • net core 2.2
  • vs2019

背景

在vs2019使用net core 2.2發布到IIS 10上(見在 ASP.NET Core 中使用多個環境),正常是沒有問題的。想着使用環境變量進行環境配置,在發布文件上加了一個節點信息:

 <EnvironmentName>Development</EnvironmentName>

20191111-pubxml-file.png

就出現了問題:

20191111-http-error-500.30.png

不明所以,查了一番找到了官網Azure App Service 和 IIS 上的 ASP.NET Core 疑難解答

20191111-http-error-500.30-site.png

哦,可能是共享框架版本不存在,

stdout日志即使改為true也沒有日志文件產生,只能看看事件查看器
20191111-iis-event.png

這一串也是看不懂了:

 Application '/LM/W3SVC/2/ROOT' with physical root 'D:\06-IIS\netcore-sample\netcoe.S01.base\' failed to load clr and managed application. CLR worker thread exited prematurely 
   Process Id: 10864. 
   File Version: 12.2.19169.6. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: e7f262e33108e92fc8805b925cc04b07d254118b 

Application '/LM/W3SVC/2/ROOT' with physical root 'D:\06-IIS\netcore-sample\netcoe.S01.base\' failed to load clr and managed application. Unexpected exception: HRESULT 0x800700b7 returned at d:\b\w\da744fbcc13abce\src\servers\iis\aspnetcoremodulev2\inprocessrequesthandler\inprocessapplication.cpp:198  
   Process Id: 10864. 
   File Version: 12.2.19169.6. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: e7f262e33108e92fc8805b925cc04b07d254118b 

github上找到一個相似問題的:2.2.0 IIS Hosting Bundle 500.30 error when setting web.config ASPNETCORE_ENVIRONMENT #5973

似乎沒啥用,又根據文中鏈接找到Duplicate ASPNETCORE_Environment present for InProcess hosting causes ASPNET CORE 2.2 fails to load appsettings #4566

也沒啥用! asp.net core的團隊開發者說解決了!英文不好借助翻譯看了很久也沒找到答案。

是裝了net core 2.2的錯?

之前這個方法我一直在用,使用net core 2.1.1是沒有問題,安裝了net core 2.2原先net core 2.1.1的項目也不能這種方式在IIS上部署了?

刪除所有runtmie和sdk

官方說是共享庫問題,於是我將所有的net coreruntime,sdk以及hosting盡數刪除,只安裝net core 2.2仍然不行。

至此這個問題一直無解!......

net core 3.0

使用net core 3.0 版本,這個問題就不會出現。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM