Service Class

The Service class represents one of the components or services in the topology of a server farm. Service is the base class from which all components or services are derived.

System.Object

Microsoft.SharePoint.Portal.Topology.TopologyObjectBase

   **Microsoft.SharePoint.Portal.Topology.Service**

Public Constructors

The following table shows the constructors of the Service class and a brief description of each.

Name Description
Service Initializes a new instance of the Service class based on the specified type of service or component and Server object.
Service Initializes a new instance of the Service class based on the specified GUID and instance name of the Service object and specified Server object.

Public Methods

The following table shows the methods of the Service class and a brief description of each.

Name Description
Commit(Boolean) Persists changes made to the properties of a Service object.
IsActive Indicates whether or not the Service object is online.

Public Properties

The following table shows the properties of the Service class, the data type of each property, and a brief description of each.

Name Data type Description
Class System.Guid Gets or sets a GUID that identifies the type of Service object.
Instance String Gets or sets the named instance of the Service object, if applicable.
Server Microsoft.SharePoint.Portal.Topology.Server Gets or sets the Server object on which the service runs.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

The Service class is the base class from which other classes that represent all components or services in the topology of the server farm are derived.

To use the properties and methods of the objects in the Topology namespace you must be a member of the local STS_WPG and SPS_WPG security groups, and a member of the db_owner database role for the configuration database.

In addition, for certain methods, such as those that create a portal site, you must be a member of the local Administrators group, and have membership in the Database Creators and Security Administrators server roles in the SQL Server instance that hosts the configuration database.

Requirements

Namespace: Microsoft.SharePoint.Portal.Topology

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security