Microsoft MVP성태의 닷넷 이야기
오류 유형: 474. 닷넷 COM+ - Failed to load the runtime. [링크 복사], [링크+제목 복사],
조회: 19170
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

닷넷 COM+ - Failed to load the runtime.

닷넷 COM+ 사용 시 다음과 같은 오류가 발생한다면?

Server Error in '/' Application.
--------------------------------------------------------------------------------

Failed to load the runtime. (Exception from HRESULT: 0x80131700) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: Failed to load the runtime. (Exception from HRESULT: 0x80131700)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 

[COMException (0x80131700): Failed to load the runtime. (Exception from HRESULT: 0x80131700)]
   System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
   System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) +16
   System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +301
   System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType) +195
   System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj) +85
   WebSiteTest.ComPlusServerTest.Page_Load(Object sender, EventArgs e) in d:\WebSiteTest4\ComPlusServerTest.aspx.cs:115
   System.Web.UI.Control.OnLoad(EventArgs e) +104
   System.Web.UI.Control.LoadRecursive() +112
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2213

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0 

만약 COM+가 "서버 활성화" 유형이고 해당 DLL이 CLR 2 기반으로 빌드된 것이라면 저런 오류가 발생할 수 있습니다. 일례로, COM+의 dllhost.exe에서 DLL을 활성화시킬 때 DLL의 Target Framework 버전이 2.0 ~ 3.5라면 dllhost.exe 내에 .NET Framework 2.0 ~ 3.5에 해당하는 런타임을 올리려 할 것입니다. 문제는, 해당 운영체제에 .NET 3.5가 설치되어 있지 않은 경우 저런 식으로 "Failed to load the runtime" 예외가 발생하는 것입니다.

문제의 원인을 알았으니 해결도 간단합니다.

그냥 .NET Framework 3.5를 설치하든가, 해당 COM+ DLL을 .NET Framework 4.0 이상의 버전으로 다시 빌드해 배포하면 됩니다.




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







[최초 등록일: ]
[최종 수정일: 8/8/2018]

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

비밀번호

댓글 작성자
 



2019-08-19 07시44분
[지나갑니다.] 혹시 윈도우10 환경에서 닷넷 4.6 혹은 4.7만 설치되어있을 경우에도 위의 에러가 발생할 수 있을까요?
[guest]

... 121  122  123  124  125  [126]  127  128  129  130  131  132  133  134  135  ...
NoWriterDateCnt.TitleFile(s)
2904정성태4/27/201527055DDK: 6. ZwTerminateProcess로 프로세스를 종료하는 Device Driver 프로그램 [2]파일 다운로드1
2903정성태4/20/201520537Windows: 110. (무료) 마이크로소프트 온라인 강좌 소개 - Azure에서 제공하는 계정 관리 서비스
2902정성태4/16/201526495Windows: 109. (무료) 마이크로소프트 온라인 강좌 소개 - Active Directory 이해
2901정성태4/15/201523103Windows: 108. (무료) 마이크로소프트 온라인 강좌 소개 - Windows Server 2012 R2 주요 기술 (Hyper-V 관점)
2900정성태3/24/201522139오류 유형: 279. robocopy 오류 - The file cannot be accessed by the system [4]
2899정성태3/24/201530242개발 환경 구성: 264. Visual Studio 2013 솔루션을 2015로 마이그레이션
2898정성태3/24/201520826개발 환경 구성: 263. SharePoint 2013을 Windows Server 2012 R2에 설치
2897정성태3/18/201519498오류 유형: 278. LoadLibrary("...") failed - Invalid access to memory location.
2896정성태3/18/201519650VC++: 90. Visual Studio 2013에서 Visual Basic 6용 ATL Control 제작
2895정성태3/18/201522702VC++: 89. Visual Studio 2015 - auto 반환 타입 및 thread_local 예약어 지원(C++ 11 표준) [2]
2894정성태3/18/201520962.NET Framework: 509. ELEMENT_TYPE_MODIFIER의 조합
2893정성태3/18/201521049오류 유형: 277. command line error MIDL1004: cannot execute C preprocessor cl.exe
2892정성태3/17/201525916오류 유형: 276. robocopy - Logon failure: unknown user name or bad password.
2891정성태3/17/201542056개발 환경 구성: 262. Visual Basic 6 (Enterprise Edition)을 Windows 7 x86에 설치하는 방법 [1]
2890정성태3/17/201524421오류 유형: 275. Internet Explorer - This page can't be displayed
2889정성태3/17/201525057Windows: 107. (2015-03-12) 업데이트 이후 작업 표시줄 또는 탐색기의 반응이 느려지는 문제 [1]
2888정성태3/17/201523111.NET Framework: 508. Visual Studio 빌드 - fatal error C1033: cannot open program database ''
2887정성태3/13/201520321.NET Framework: 507. CoreFx 빌드하는 방법
2886정성태3/13/201522100오류 유형: 274. CoreFx, CoreCLR 빌드 시 "error CS0518: Predefined type 'System.Object' is not defined or imported" 오류 해결 방법
2885정성태3/13/201533428VS.NET IDE: 99. Visual Studio는 2019는 32비트, 2022부터 64비트 버전입니다. [2]
2884정성태3/12/201526715.NET Framework: 506. .NETCore = CoreFX + CoreCLR [5]
2883정성태3/10/201523849.NET Framework: 505. OpenCover 소스 코드 분석을 Visual Studio 2013에서 하는 방법 [1]
2882정성태3/10/201522742.NET Framework: 504. OpenCover 코드 커버리지 도구의 동작 방식을 통해 살펴보는 Calli IL 코드 사용법
2881정성태3/9/201523271개발 환경 구성: 261. OpenCover 오픈 소스를 이용한 .NET 코드 커버리지(Code coverage)
2880정성태3/7/201521524개발 환경 구성: 260. C# Code Coverage 도구 - Semantic Designs 소개
2879정성태3/3/201526520개발 환경 구성: 259. Visual Studio 없이 Visual C++ 컴파일하는 방법
... 121  122  123  124  125  [126]  127  128  129  130  131  132  133  134  135  ...