Share via


Integrating Service Applications with the Manage Services Applications Page

Applies to: SharePoint Foundation 2010

The Manage Service Applications page in SharePoint 2010 Central Administration is used by administrators to manage service applications and proxies.

The Manage Service Applications page includes ribbon buttons that do the following:

  • New  Creates a service application.

  • Connect  Connects to service applications published by other farms.

  • Delete  Deletes the selected service application or service application connection.

  • Manage  Manages the settings for the selected service application.

  • Administrators  Assigns administrators to the selected service application.

  • Properties  Edits common properties.

  • Publish  Makes the selected service application available to other farms.

  • Permissions  Determines which accounts can access the selected service application.

Making your service application available from the Manage Service Applications page involves adding your service application to the list of available service applications, modifying the buttons on the ribbon on the Manage Service Application page, and creating a service application administration page to handle any user input.

Adding a Service Application Menu Item to the New Button

The New button on the Manage Service Applications page ribbon is always enabled. Clicking New displays a list of the service applications that a farm administrator can create. You can include your own service application on this list.

To include a service application in the list of available service applications

  1. Create a page to collect any required user input, and create a service application with a matching local proxy.

  2. Implement the IServiceAdministration interface on your SPService derived class.

  3. Override SPService::GetCreateApplicationLink to return a link to the page created in step 1.

The following example shows how to add a service application in the list of available service applications.

//Placeholder for the actual GUID.
[Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")]
public sealed class SampleWebService
    : SPIisWebService, IServiceAdministration
{
    public Type[] GetApplicationTypes()
    {
        return new Type[] { typeof(SampleWebServiceApplication) };
    }
 
    public SPPersistedTypeDescription GetApplicationTypeDescription(
        Type serviceApplicationType)
    {
        if (serviceApplicationType != typeof(SampleWebServiceApplication))
        {
            throw new NotSupportedException();
        }
 
        return new SPPersistedTypeDescription(
            "Sample Web Service",
            "A sample web service.");
    }
 
    public override SPAdministrationLink GetCreateApplicationLink(
        Type serviceApplicationType)
    {
        // NOTE: Because there can be only one instance of this service,
        // and there is only one application type, the target page 
        // does not require any query string parameters.
        return new SPAdministrationLink("/_admin/SampleCreate.aspx");
    }
}
// Placeholder for your actual GUID <System.Runtime.InteropServices.GuidAttribute("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")>
Public NotInheritable Class SampleWebService
    Inherits SPIisWebService
    Implements IServiceAdministration
    Public Function GetApplicationTypes() As Type()
        Return New Type() {GetType(SampleWebServiceApplication)}
    End Function

    Public Function GetApplicationTypeDescription(ByVal serviceApplicationType As Type) As SPPersistedTypeDescription
        If serviceApplicationType IsNot GetType(SampleWebServiceApplication) Then
            Throw New NotSupportedException()
        End If

        Return New SPPersistedTypeDescription("Sample Web Service", "A sample web service.")
    End Function

    Public Overrides Function GetCreateApplicationLink(ByVal serviceApplicationType As Type) As SPAdministrationLink
        ' NOTE: Because there can be only one instance of this service,
        ' and there is only one application type, the target page 
        ' does not require any query string parameters.
        Return New SPAdministrationLink("/_admin/SampleCreate.aspx")
    End Function
End Class

Enabling the Connect Button

The Connect button on the Manage Service Applications page ribbon is used to connect to a service application. Internally, this operation creates a service application proxy.

Clicking the arrow under the Connect button displays the list of currently running proxies and services.

Clicking the Connect button itself starts the Connect to a Remote Service Application Wizard. This wizard enables an administrator to create a connection by browsing the service applications published from a farm.

To enable this button when your service application is selected, implement ISharedServiceApplication on your SPServiceApplication derived class.

Note

The SPIisWebServiceApplication base class implements ISharedServiceApplication, so publishing is enabled by default.

Enabling the Delete Button

The Delete button on the Manage Service Applications page ribbon is enabled when any item is selected on the Manage Service Application page. For the selected item, this operation does the following:

  • Calls the Unprovision method with a value of true if user data associated with the selected item should be deleted; otherwise, the value is false.

  • Calls the Delete method.

Enabling the Manage Button

The Manage button on the ribbon is used to manage the selected service application or proxy.

To enable the Manage button when your service application or proxy is selected

  1. Create a page in Central Administration to manage the service application or proxy.

  2. Override the ManageLink property on the SPServiceApplication or SPServiceApplicationProxy derived class to link to the page created in step 1.

    The following code example shows how the Manage button is enabled for the selected service application.

    public override SPAdministrationLink ManageLink
    {
        get
        {
            return new SPAdministrationLink(
                "/_admin/SampleManage.aspx?id=" + this.Id.ToString());
        }
    }
    
    Public Overrides ReadOnly Property ManageLink() As SPAdministrationLink
            Get
                Return New SPAdministrationLink("/_admin/SampleManage.aspx?id=" & Me.Id.ToString())
            End Get
    End Property
    

Enabling the Administrators Button

The Administrators button on Manage Service Applications page ribbon is enabled when a service application is selected from the Manage Service Application page. It is used to control which users have delegated administration access to the service application.

Enabling the Properties Button

The Properties button is used to edit the settings for the selected item.

Note

Settings on this page are intended for farm administrators only.

To enable the Properties button when your service application or proxy is selected

  1. Create a page in SharePoint 2010 Central Administration to edit the properties of your service application or proxy.

  2. Override the PropertiesLink property on the SPServiceApplication or SPServiceApplicationProxy derived class to link to the page created in step 1.

Enabling the Publish Button

If it is enabled, the Publish button on the Manage Service Applications page ribbon is used to publish a service application to other server farms. After a service application is published, administrators of other service farms can discover it by using the Connect button on the ribbon.

To enable the Publish button when your service application is selected, implement ISharedServiceApplication on your SPServiceApplication derived class.

Note

The SPIisWebServiceApplication base class implements ISharedServiceApplication, so publishing is enabled by default.

Enabling the Permissions Button

The Permissions button on the Manage Service Application page ribbon is used to control access to a service application. Typically, you use this button to enable a remote server farm to connect to the service application.

To enable the Permissions button when your service application is selected

  1. Create a page in SharePoint 2010 Central Administration to specify the accounts or other principals that have access to invoke your service application or proxy.

  2. Override the PermissionsLink property on the SPServiceApplication or SPServiceApplicationProxy derived class to link to the page created in step 1.