Serviced Component

A services component is a .Net component that uses the component services of COM+, such as the object pooling, transaction management etc. It executes within the managed execution environment of the .Net framework and shares its context with a COM+ application. It enables the context sharing between the COM+ and .Net framework classes. A serviced component created by defining a class that has been directly or indirectly derived from the ServicesComponent class. It utilizes the COM+ services by using the attributes of the System.EnterpriseServices namespace. A serviced component should be registered before it can access the component services of COM+. The following are the three types of registrations that are used to register a serviced component:

  • Manual registration: The .Net Framework Service Installation (Regsvcs.exe) tool is used to manually register an assembly containing a serviced component. Manual registration is used for the design-time testing, to find out the error types that may occur at the runtime.
  • Dynamic registration: In a dynamic registration, as assembly with a serviced component is copied into the COM+ application's directory. A dynamic registration is used only when a serviced component is created by a managed client.
  • Programmatic registration: Programmatic registration is used to register as assembly, containing a serviced component programmatically by creating as instance of the RegistrationHelper class.