Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

The ServicedComponent being invoked is not correctly configured (Use regsvcs to re-register).

이런 유의 오류가 발생하면서,

Server Error in '/' Application.
The ServicedComponent being invoked is not correctly configured (Use regsvcs to re-register).
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.EnterpriseServices.ServicedComponentException: The ServicedComponent being invoked is not correctly configured (Use regsvcs to re-register).

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:

[ServicedComponentException: The ServicedComponent being invoked is not correctly configured (Use regsvcs to re-register).]
   System.EnterpriseServices.ServicedComponentProxy.FilterConstructors() +115
   System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType) +752
   System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj) +67
   TestWebApp.ComPlusServerTest.Page_Load(Object sender, EventArgs e) in C:\Temp\TestWebApp\ComPlusServerTest.aspx.cs:63
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1716

메시지에 따라 regsvcs.exe로 COM+ 객체를 등록할 때 다음의 오류 메시지가 나오는 경우,

The following installation error occurred:
1: One or more of the components being installed are already registered as 64 bit components in the target application. You must install the 32 bit versions of the components being installed in a diff
erent COM+ application, or delete the existing 64 bit versions of the components being installed from the target COM+ application prior to attempting install of the 32 bit versions. COM+ applications
cannot contain bit neutral components.


아마도 .NET COM+ DLL을 이미 COM+에 64비트 Library 유형으로 등록한 상태에서 다시 32비트로도 COM+에 등록하는 경우일 것입니다.

어쩔 수 없습니다. 만약 저런 상황이 나오면 해당 COM+ 객체를 64비트와 32비트에 대해 ApplicationName 등의 속성을 별도 분리해서 컴파일해야 합니다.

#if DEF_X86BUILD
[assembly: ApplicationName("MyComponentLibraryX86")]
#else
[assembly: ApplicationName("MyComponentLibrary")]
#endif

또한 각각의 Library 유형에서 서비스하게 되는 COM+ 객체의 GUID도 바꿔서,

#if DEF_X86BUILD
[System.Runtime.InteropServices.Guid("F873A6B6-ADC0-4C51-AF0F-FC2F88E466A6")]
#else
[System.Runtime.InteropServices.Guid("BDC0B215-0BA0-465A-A0C8-7CD5C7120ECF")]
#endif
public class MyComponentLibrary : ServicedComponent
{
    // ...[생략]...
}

빌드하면, 이후 해당 COM+를 사용하는 32/64비트 응용 프로그램은 정상적으로 객체를 등록/활성화할 수 있습니다.




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







[최초 등록일: ]
[최종 수정일: 3/17/2020]

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

비밀번호

댓글 작성자
 




... 196  [197]  198  199 
NoWriterDateCnt.TitleFile(s)
55정성태10/3/200422472COM 개체 관련: 11. 내가 생각해 보는 COM의 현재 위치
54정성태8/30/200428086VC++: 10. 내가 생각해 보는 MFC OCX와 ATL DLL에 선택 기준
53정성태11/20/200527377VC++: 9. CFtpFileFind/FtpFileFind가 일부 Unix FTP 서버에서 목록을 제대로 못 가져오는 문제
184정성태11/23/200521115    답변글 VC++: 9.1. FTP 관련 토픽파일 다운로드1
51정성태6/24/200426229VC++: 8. BSTR 메모리 할당 및 해제(MSDN Library 발췌) [1]
50정성태6/16/200419464기타: 6. 1차 데스크톱 컴퓨터 사양
49정성태6/16/200419854기타: 5. 53만 원대 Second PC 마련. ^^
48정성태3/2/200421768.NET Framework: 9. 윈도우즈 발전사를 모아 둔 사이트. [1]
47정성태11/14/200520106VS.NET IDE: 7. 한글 OS에서 Internet Explorer 6.0 with SP1의 UI 언어 바꾸는 방법
45정성태1/26/200419535기타: 4. MCAD 시험
44정성태1/26/200420300VS.NET IDE: 6. 터미널 서비스 포트 변경 ( 서버 및 클라이언트 )
46정성태1/26/200425392    답변글 VS.NET IDE: 6.1. Windows 2003 터미널 서비스 라이센스 서버 없이 접속
114정성태11/14/200516682    답변글 VS.NET IDE: 6.2. [터미널 서버 라이센스] : 활성화 시 오류
43정성태12/23/200320092기타: 3. XP/2003 개인 방화벽 설정파일 다운로드1
40정성태7/23/200323717COM 개체 관련: 10. IE BHO 개체를 개발할 때, 인터넷 익스플로러가 아닌 탐색기에서 활성화 되는 문제 해결 [1]
41김성현7/24/200322335    답변글 COM 개체 관련: 10.1. [답변]: IE BHO 개체를 개발할 때, 인터넷 익스플로러가 아닌 탐색기에서 활성화 되는 문제 해결
42정성태7/29/200320202        답변글 COM 개체 관련: 10.2. feedback 을 받기 위해서 답변 기능을 가능하게 해두었습니다.
39정성태7/17/200326119VS.NET IDE: 5. 원격 제어 3가지 방법
38정성태7/17/200322489.NET Framework: 8. IIS 서버 재설치와 ASP.NET 서비스의 문제점
36정성태7/17/200323308.NET Framework: 7. 시행착오 - WebService 참조 추가 오류
35정성태7/17/200323846.NET Framework: 6. Win2000에서의 .NET COM+ 자동 등록 오류 발생 해결
34정성태7/17/200322467VS.NET IDE: 4. VC++ 원격 디버깅파일 다운로드1
33정성태7/17/200322682VS.NET IDE: 3. Win2000 NAT 서비스
32정성태7/17/200323856COM 개체 관련: 9. _bstr_t, CComBSTR, string 클래스 사용 [1]
31정성태7/17/200320837COM 개체 관련: 8. IDL 구문에서 구조체를 pack 하는 방법
30정성태7/17/200338314VC++: 7. [STL] vector 사용법 및 reference 사용예 [1]파일 다운로드1
... 196  [197]  198  199