I have two .NET assemblies that are registered as COM + components, and I test them from a regular test harness for a console application;
Dim objFirst As New MyFirstComponent() 'COM+ initialisation
Dim RC As Boolean = objFirst.GetValue()
The method call succeeds. This is the definition of MyFirstComponent;
<ProgId("MyFirstComponent")> _
<Guid("...")> _
<ClassInterface(ClassInterfaceType.None)> _
<Transaction(TransactionOption.Supported)> _
Public Class MyFirstComponent
Inherits ServicedComponent
Implements IMyFirstComponent
Public Function GetValue() As Boolean Implements IMyFirstComponent.GetValue
Dim objSecond As New MySecondComponent() 'COM+ initialisation
Dim RC As Boolean = objSecond.GetValue()
Return RC
End Function
End Class
The moment MySecondComponent is initialized, I get a RemotingException with the following message:
Unable to load type "MySecondComponent", ..., Version = ..., Culture = neutral, PublicKeyToken = ... '
All assemblies are also strongly named. I cannot decide why I can successfully start a method call for the first component, but when it tries to load the second component later, it cannot resolve the type.
, "GetValue()" , , . , , COM + -, COM +.
, . , COM + - , COM + " ", . , , - (, GAC), - COM + - , . , GAC , .
. , . COM +, , . , GAC, , , COM- .