Microsoft MVP성태의 닷넷 이야기
오류 유형: 899. HTTP Error 500.32 - ANCM Failed to Load dll [링크 복사], [링크+제목 복사],
조회: 1537
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

(시리즈 글이 15개 있습니다.)
오류 유형: 2. [COM+] CreateObject 와 HTTP 500 - Internal server error
; https://www.sysnet.pe.kr/2/0/242

오류 유형: 111. IIS - 500.19 오류 (0x8007000d)
; https://www.sysnet.pe.kr/2/0/976

오류 유형: 201. ASP.NET 웹 사이트를 IIS 7 이상의 환경에서 호스팅할 때 500 오류 발생
; https://www.sysnet.pe.kr/2/0/1563

오류 유형: 219. IIS 500 Internal Server Error - Skydrive에 공유된 경우
; https://www.sysnet.pe.kr/2/0/1612

오류 유형: 232. IIS 500 Internal Server Error - NTFS 암호화된 폴더에 웹 애플리케이션이 위치한 경우
; https://www.sysnet.pe.kr/2/0/1722

오류 유형: 340. HTTP Error 500.23 - Internal Server Error
; https://www.sysnet.pe.kr/2/0/10997

오류 유형: 360. IIS - 500.19 오류 (0x80070021)
; https://www.sysnet.pe.kr/2/0/11061

개발 환경 구성: 307. ASP.NET Core Web Application을 IIS에서 호스팅하는 방법
; https://www.sysnet.pe.kr/2/0/11120

오류 유형: 580. HTTP Error 500.0/500.33 - ANCM In-Process Handler Load Failure
; https://www.sysnet.pe.kr/2/0/12064

오류 유형: 631. .NET Core 웹 응용 프로그램 오류 - HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process
; https://www.sysnet.pe.kr/2/0/12268

오류 유형: 662. ASP.NET Core와 500.19, 500.21 오류 (0x8007000d)
; https://www.sysnet.pe.kr/2/0/12356

개발 환경 구성: 635. 비주얼 스튜디오에서 실행하던 ASP.NET Core (.NET Framework) 응용 프로그램을 명령행에서 실행하는 방법 (2)
; https://www.sysnet.pe.kr/2/0/12955

.NET Framework: 1164. HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
; https://www.sysnet.pe.kr/2/0/12982

오류 유형: 884. HTTP 500.0 - 명령행에서 실행한 ASP.NET Core 응용 프로그램을 실행하는 방법
; https://www.sysnet.pe.kr/2/0/13488

오류 유형: 899. HTTP Error 500.32 - ANCM Failed to Load dll
; https://www.sysnet.pe.kr/2/0/13579




HTTP Error 500.32 - ANCM Failed to Load dll

ASP.NET Core 3.1 웹 애플리케이션을 Self Contained 유형으로 Azure에 배포했더니 이런 오류가 발생합니다.

HTTP Error 500.32 - ANCM Failed to Load dll
Common solutions to this issue:
The application was likely published for a different bitness than w3wp.exe/iisexpress.exe is running as.
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526

다행히 검색해 보면 해결책이 나오는데요,

HTTP Error 500.32 - ANCM Failed to Load dll after deploying a Self Contained .Net Core 3.1 App to Azure
; https://stackoverflow.com/questions/60073546/http-error-500-32-ancm-failed-to-load-dll-after-deploying-a-self-contained-ne

이유는 알 수 없지만, Self Contained 유형으로는 InProcess 활성화가 제공되지 않는 것입니다. 따라서, OutOfProcess로 동작하도록 web.config을 바꾸면 되지만, ASP.NET Core 프로젝트이기 때문에 csproj에 다음과 같은 속성을 정의해 deploy 단계에서 web.config에 반영하도록 변경할 수 있습니다.

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

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

</Project>




참고로, 문제가 발생할 때의 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=".\TestExtension.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>

processPath를 보면 TestExtension.exe로 왠지 dll이 아니어서 그럴 것 같기도 한데, 실제로 이걸 TestExtension.dll로 바꾼다고 해도 오류 메시지만 바뀔 뿐,

HTTP Error 500.0 - ANCM In-Process Handler Load Failure
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526

역시 동작을 하지 않습니다. 따라서, 정상 동작하려면 아래와 같은 식으로 구성돼 있어야 합니다.

<?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=".\TestExtension.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />
    </system.webServer>
  </location>
</configuration>




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 3/13/2024]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  8  9  [10]  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13392정성태7/16/20233622오류 유형: 872. Oracle - ORA-01031: insufficient privileges
13391정성태7/14/20233643닷넷: 2132. C# - sealed 클래스의 메서드를 callback 호출했을 때 인라인 처리가 될까요?
13390정성태7/12/20233549스크립트: 53. 파이썬 - localhost 호출 시의 hang 현상
13389정성태7/5/20233622개발 환경 구성: 684. IIS Express로 호스팅하는 웹을 WSL 환경에서 접근하는 방법
13388정성태7/3/20233814오류 유형: 871. 윈도우 탐색기에서 열리지 않는 zip 파일 - The Compressed (zipped) Folder '[...].zip' is invalid. [1]파일 다운로드1
13387정성태6/28/20233879오류 유형: 870. _mysql - Commands out of sync; you can't run this command now
13386정성태6/27/20233996Linux: 61. docker - 원격 제어를 위한 TCP 바인딩 추가
13385정성태6/27/20234198Linux: 60. Linux - 외부에서의 접속을 허용하기 위한 TCP 포트 여는 방법
13384정성태6/26/20233911.NET Framework: 2131. C# - Source Generator로 해결하는 enum 박싱 문제파일 다운로드1
13383정성태6/26/20233644개발 환경 구성: 683. GPU 런타임을 사용하는 Colab 노트북 설정
13382정성태6/25/20233687.NET Framework: 2130. C# - Win32 API를 이용한 윈도우 계정 정보 (예: 마지막 로그온 시간)파일 다운로드1
13381정성태6/25/20234102오류 유형: 869. Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
13380정성태6/24/20233515스크립트: 52. 파이썬 3.x에서의 동적 함수 추가
13379정성태6/23/20233545스크립트: 51. 파이썬 2.x에서의 동적 함수 추가
13378정성태6/22/20233427오류 유형: 868. docker - build 시 "CANCELED ..." 뜨는 문제
13377정성태6/22/20237311오류 유형: 867. 파이썬 mysqlclient 2.2.x 설치 시 "Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually" 오류
13376정성태6/21/20233689.NET Framework: 2129. C# - Polly를 이용한 클라이언트 측의 요청 재시도파일 다운로드1
13375정성태6/20/20233368스크립트: 50. Transformers (신경망 언어모델 라이브러리) 강좌 - 2장 코드 실행 결과
13374정성태6/20/20233459오류 유형: 866. 파이썬 - <class 'AttributeError'> module 'flask.json' has no attribute 'JSONEncoder'
13373정성태6/19/20234750오류 유형: 865. 파이썬 - pymssql 설치 관련 오류 정리
13372정성태6/15/20233319개발 환경 구성: 682. SQL Server TLS 통신을 위해 사용되는 키 길이 확인 방법
13371정성태6/15/20233425개발 환경 구성: 681. openssl - 인증서 버전(V1 / V3)
13370정성태6/14/20233565개발 환경 구성: 680. C# - Ubuntu + Microsoft.Data.SqlClient + SQL Server 2008 R2 연결 방법 - TLS 1.2 지원
13369정성태6/13/20233378개발 환경 구성: 679. PyCharm(을 비롯해 JetBrains에 속한 여타) IDE에서 내부 Window들의 탭이 없어진 경우
13368정성태6/13/20233537개발 환경 구성: 678. openssl로 생성한 인증서를 SQL Server의 암호화 인증서로 설정하는 방법
13367정성태6/10/20233694오류 유형: 864. openssl로 만든 pfx 인증서를 Windows Server 2016 이하에서 등록 시 "The password you entered is incorrect" 오류 발생
1  2  3  4  5  6  7  8  9  [10]  11  12  13  14  15  ...