I never get ok with the COM+ contexts... There are so many context types like client context, call context etc... Adding to this .NET provides few attributes such as MustRunInClientContext... I couldn't find any sample or links that explain this...

Let me elaborate more. As the definition goes by saying "context" is a conceptual grouping of objects within a transaction. However when u instantiate a COM+ component (TransactionOption.Supported) within another COM+ component (TransactionOption.RequiresNew), when i check the ContextUtil.ContextID, the two components are instantiated in different contexts... WHY?

Secondly, the definition says MustRunInClientContext runs the component in the client context but if try this with the above component (TransactionOption.Supported) it most always results in an exception... WHY?

Third and final, this is different from contexts but i just found this... Just create a COM+ component (Inherit ServicedComponent, Set transaction - every thing normal - you can do this simply by selecting Transaction Component template in VB.NET)... If you give description attribute to any of the methods, you will get method level rolebased security exception - if you remove the description attribute, you won't get this exception...

phew, COM+ seems to be a land of uncertainty....

Votes + Comments
Wish I could help! COM+ is not my thing!
14 Years
Discussion Span
Last Post by srikkanthan

Let me add one more, If you create a com+ component with ActivationOption.Server, you can't have methods that return objects (MarshalByRef)... I tried and got Remoting exceptions...

Only in ActivationOption.Library, I am able to return my custom objects... Even after implementing ISerializable or <Serializable> attribute it didn't worked for me (alas). Can anybody tried returning custom object as well as other .NET objects itself like ArrayList...

In webservices, it is understandable that the contract is text based but COM+ being binary contract, it should work isn't it....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.