About a very cool and useful feature in COM+ 1.5: Services without Components
Ever heard about SWC (Services without Components)? It is a feature of COM+ 1.5 (available in Windows XP and Windows Server 2003) which enables you to leverage COM+ component services without the need for a Serviced Component to be registered in the COM+ catalog. You simply access COM+ through a set of APIs - this is very cool. And of course it bypasses e.g. the annoying circumstance to be an administrator to initially register such a component with COM+ (I tested it by using the runas command in Windows XP).
For better understanding what I mean you can download this very simple SWC sample project. In it I have a console application and an ASP.NET XML Web Service using this helpful approach. My sample is restricted to using the transaction feature only (yes I know that it is not a good idea to use COM+ managed transactions with a single datastore - but hey, this is just a technology sample! ;-)).
BTW, I am not quite sure whether the code is self-explanatory or not (there are no comments). So if you have questions: go ahead in the comments section.
Update: Scott Swigart posted a comment to this post and pointed to an article he and his fellow writer published some time ago: Early and Adopter on: COM+ 1.5, Services Without Components. Thanks!
Another update: Tomas Restrepo points out in a very elaborate manner why SWC are not supported in full breadth on Windows XP. Here is an essential fragment:
I just looked at the docs for the February 2003 Platform SDK documentations, and it seems this has been corrected. CoEnterServiceDomain() and friends are now documented as being supported on Windows Server 2003 only. And, in fact, the SWC support in the .NET Framework 1.1 will only work in WS 2003.... the ServiceConfig class won't even instantiate in XP. I was told in very certain terms that the public message from now on would be that SWC was NOT supported on XP.
So please be aware when using my above sample on XP - altough with this simple set of demo functionality it at least works for me. Thanks Tomas.