COM+ server in .net

J

Jozsef Bekes

Hi All,

I would like to know whether the following limitation exists in .net.

I want to implement a COM+ exe server to which I would like to connect with
a delphi, a vb6 and a c# client. When I try to add reference to the tlb in
C#, an error message appears stating the following:

Converting the type library to a .NET assembly failed. Type library
Kispajtas was exported from a CLR assembly and can not be re-imported as a
CLR assembly.

It seems to me that the above scenario cannot be implemented, because a C#
client cannot use a dotnet written COM+ server in the way as delphi can ???
This seems quite odd to me.

If this is not so or you know a workaround please let me know.

Thanks,
Jozsi
 
S

Steve Walker

Jozsef Bekes said:
Hi All,

I would like to know whether the following limitation exists in .net.

I want to implement a COM+ exe server to which I would like to connect with
a delphi, a vb6 and a c# client. When I try to add reference to the tlb in
C#, an error message appears stating the following:

Converting the type library to a .NET assembly failed. Type library
Kispajtas was exported from a CLR assembly and can not be re-imported as a
CLR assembly.

It seems to me that the above scenario cannot be implemented, because a C#
client cannot use a dotnet written COM+ server in the way as delphi can ???
This seems quite odd to me.

If this is not so or you know a workaround please let me know.

Don't reference the type library. Reference the assembly.
 
J

Jozsef Bekes

Steve Walker said:
Don't reference the type library. Reference the assembly.


Hi

Thank you for the answer, but an exe cannot be referenced as far as I know
(or is there a way?), and I'd like to avoid splitting the server into an exe
and a dll (other clients do not need it...).

Regards,
Jozsi
 
S

Steve Walker

Thank you for the answer, but an exe cannot be referenced as far as I know
(or is there a way?), and I'd like to avoid splitting the server into an exe
and a dll (other clients do not need it...).

Any specific reason for hosting it in an exe rather than as a dll in
component services? How have you implemented an exe server in C#?
 
W

Willy Denoyette [MVP]

You seem to confuse COM+ with COM interop. .NET assemblies need to be
registered in the COM+ catalog, this can be done using regsvcs.exe, but this
is not what you are looking for.
You seem to refer to a .tlb file from within VS, this .tlb file can only be
used by native COM clients only (VB, Delphy, C++ ..) , .NET (C#) clients
don't need to reference the typelib, they need a reference to the .NET
assembly , unfortunately this can't be done from within VS for .exe
assemblies. One option is to run the compiler from the command line, this
one allows you to refer to .exe assemblies (csc /r:yourAssembly.exe .....),
but much better would be to split the .exe into separate components.


Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top