Service Management Service

Microsoft AppFabric 1.1 for Windows Server provides an environment for running and managing WCF and WF services. The Service Management Service further enhances AppFabric management capabilities by providing clients the ability to start services remotely. The Service Management Service is a WCF service that AppFabric automatically adds to all applications with the serviceManagement attribute enabled.

Scenarios Supported by the Service Management Service

The Service Management Service supports the following primary scenarios.

Activation of workflow service instances

The Workflow Management Service (WMS) invokes the Service Management Service (SMS) to activate workflow service instances that have pending work. The SMS activates a workflow service host, which creates an instance store (such as SQL Workflow Instance Store) and invokes a method on the store to load the workflow service instance from the instance store into memory. For more details about instance activation, see Workflow Management Service.

The Workflow Management Service requires the net.pipe protocol to be enabled for the application containing the service and the net.pipe binding enabled for the site containing the service.

Scheduled startup of services

In this scenario, a custom scheduler starts services in an application according to the schedule created by a user. For example, a service may need to process a batch of work items on a daily basis. Note that the Service Management Service feature enables this scenario but does not provide a custom scheduler.


The AppFabric installation adds the following service activation parameters to root Web.config that are used when activating the Service Management Service for each application with the serviceManagement attribute enabled.

            <add relativeAddress="~/ServiceManagement.svc" service="Microsoft.ApplicationServer.Hosting.Management.ServiceManagement" factory="Microsoft.ApplicationServer.Hosting.Management.ServiceManagementFactory, Microsoft.ApplicationServer.Hosting, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

The Service Management Service supports only the net.pipe protocol for bindings. The address of a Service Management Service added to an application conforms to the following address pattern: {scheme}://hostname:port/<application>/ServiceManagement.svc. For example: net.pipe://localhost/VirtualApplicationB/ServiceManagement.svc.

The Microsoft AppFabric 1.1 for Windows Server installation assumes that the .svc extension is mapped to a WCF HTTP handler in the root Web.config. If you have the .svc extension mapped to a handler other than a WCF HTTP handler, the Service Management Service (SMS) will fail to initialize. If you have some other extension mapped to the WCF HTTP handler, update the extension of SMS from .svc to that extension in the root Web.config. Note that this workaround will not work if you have .svc handler mapping is overridden at the application level.

The Service Management Service feature is enabled by default. The AppFabric installation enables the feature by adding a serviceManagement element to root Web.config and by setting the enabled attribute on the element to true. These settings are inherited by application, virtual directory, and service levels. Therefore, the serviceManagement attribute is enabled for all applications on a computer on which AppFabric is installed.

        <serviceManagement enabled=”true” endpointConfiguration=”” authorizedWindowsGroup=”AS_Administrators” />
    </hosting >   

The following table provides descriptions of attributes of the serviceManagement element.


Attribute Description


The AppFabric installation program sets this attribute to true by default in root Web.config.


The Windows group that has access to the endpoint exposed by the Service Management Service. The AppFabric installation program sets AS_Administrators as the authorized Windows group. The identity under which the application runs also has access to the endpoint.


References a standard service management endpoint defined in the standardEndpoints section in root Web.config. The default value of this attribute is ServiceManagementNetPipeEndpoint.

// fragment from root Web.config 
<serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="true" authorizedWindowsGroup="AS_Administrators" />

You can disable service management for an application by adding the following configuration to the application Web.config.

<serviceManagement enabled=”false” />

You can remove the Service Management Service altogether by adding the following configuration to the application Web.config.

     <remove relativeVirtualPath=”~/ServiceManagement.svc” />

The Service Management Service uses the ServiceHostingEnvironment.EnsureServiceAvailable method internally. This method does not support using ASP .NET routing paths to activate services. Therefore, the Service Management Service does not support this activation scenario.

See Also