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)
30정성태7/17/200338314VC++: 7. [STL] vector 사용법 및 reference 사용예 [1]파일 다운로드1
28정성태7/17/200322637스크립트: 3. Programming Microsoft Internet Explorer 5 - CHM 파일
29정성태7/17/200322103    답변글 스크립트: 3.1. Programming Microsoft Internet Explorer 5 - 소스코드
27정성태7/17/200320950COM 개체 관련: 7. HTML Control에서 DELETE, 화살표 키 등이 안 먹는 문제
26정성태7/17/200322059COM 개체 관련: 6. WebBrowser 콘트롤에서 프레임을 구하는 소스
25정성태7/17/200319686COM 개체 관련: 5. C++ Attributes - Make COM Programming a Breeze with New Feature in Visual Studio .NET [2]파일 다운로드1
24정성태7/17/200323547.NET Framework: 5. (MHT 변환해서 가져온 글) .NET 의 COM+ 서비스 사용파일 다운로드1
23정성태7/17/200327171.NET Framework: 4. webservice.htc - HTML Script에서도 웹서비스 엑세스 [2]파일 다운로드1
22정성태7/17/200321688.NET Framework: 3. .NET Framework SDK 퀵 스타트 자습서
21정성태7/17/200320605.NET Framework: 2. 김현승님의 "ASP.NET & .NET EnterpriseServices & Remoting 코드 템플릿"
20정성태2/15/200527898VS.NET IDE: 2. Platform SDK 설치
19정성태7/17/200323731.NET Framework: 1. JScript.NET 강좌 사이트[영문]
18정성태7/17/200321104COM 개체 관련: 4. Exchanging Data Over the Internet Using XML [1]파일 다운로드1
17정성태7/17/200328933VC++: 6. Win32 API Hook - 소스는 "공개소스"에있습니다. [2]
16정성태7/17/200321482COM 개체 관련: 3. IE 툴밴드의 위치문제파일 다운로드1
15정성태7/17/200322446VC++: 5. 시행착오 - 클래스 포인터를 void * 로 대입후 delete 하는 경우.
14정성태7/17/200324052VC++: 4. MFC Message 처리 구조
13정성태7/17/200323666VC++: 3. template 활용의 최고 단계!
12정성태5/7/200621555VC++: 2. void func1( MYCLASS *&pBuildingElement ); 선언의 의미
10정성태7/17/200320027기타: 2. 데브피아 사이트의 클럽 서비스 내에 있는 Standard C++ Research
9정성태7/17/200325349기타: 1. Programming Applications for Microsoft Windows 4th Edition
8정성태7/17/200322759COM 개체 관련: 2. CWindowImpl 의 기본 윈도우 클래스 명을 바꾸려면?
7정성태7/17/200325397VS.NET IDE: 1. VC++ 프로파일링 사용법
4정성태7/17/200338098VC++: 1. C++ 클래스 멤버변수 초기화 [3]
3정성태7/17/200323901스크립트: 2. JScript에서의 Blocking 동작을 막아주는 COM 메서드
2정성태6/14/200642637COM 개체 관련: 1. IWebBrowser2와 IHTMLDocument2의 상호 변환 [2]
... 196  197  [198]  199