CLR assembly error
Hi All,
I have a WebServices, which is working fine, but i need to expose this
webservices as a COM+ object (Enterprise Services) and my codes should reference this COM+ instead of the web services (existing), to use the methods inside it.
When i tried to create a sample COM+ object and try to add reference to
this object, the error i get is'Type Library was exported from a CLR
assembly and cannot be re imported as a CLR assembly'. What does this
error mean ?
So how to i expose the webservices as a COM+ object ? any work around for
this ?
regards...
Hi,
What features of COM+ do you plan to use. If you are looking at using transactions then you can add the Transaction Attribute to the WebMethod itself.
In order to create a COM+ Component, you would derive your class from ServicedComponent. You can then reference and use it in .NET as you would any other class.
Regards,
Vikram
Hi,
I managed to solve that problem. Im using a Reference instead of a COM Reference. Realised that cannot reference to a COM object through the COM tab.
Anyway, im facing a new problem now... here it is
My COM+, references a class, lets call it class A. It uses the properties of Class A, and returns / inserts / updates / deletes etc.I have an Admin module, which accesses the COM+ component (via referencing the dll). And uses the methods which are in the COM+.
Now the problem is, the admin module also need to use the Class A, as it has to use the properties and methods of Class A as well.How to achieve this using the present COM+ component ? I have tried writing a method, which returns the Class A type, but in vain. When I access this method which returns Class A type, in the admin module, I cannot access any properties of the Class A, and a error is shown saying ' The type ClassA is defined in an assembly that is not referenced. You must add a reference to assembly 'ClassA'. I hope u get the picture. Thank You
regards,
Abhi