Server Class

The Server class represents a server computer in the topology of the server farm.

System.Object

   Microsoft.SharePoint.Portal.Topology.TopologyObjectBase

       Microsoft.SharePoint.Portal.Topology.Server

Public Constructors

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

Name Description
Server Initializes a new instance of the Server class based on the IP address of the Server object.
Server Initializes a new instance of the Server class based on the specified name and IP address of the Server object
Server Initializes a new instance of the Server class based on the specified name, IP address, and expiration date of the Server object.

Public Methods

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

Name Description
Commit(Boolean) Persists changes made to the properties of the Server object.
IsServiceActive(System.Guid) Indicates whether the specified Service object is active on the Server object.
Services(System.Guid) Returns a list of Service objects associated with the Server object.

Public Properties

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

Name Data type Description
Address String Gets or sets the IP address of the Server object.
AlertsServices Microsoft.SharePoint.Portal.Topology.AlertsServiceCollection Gets the list of AlertsService objects associated with the Server object.
Current Property Microsoft.SharePoint.Portal.Topology.Server Gets the local server computer on which the code is executing.
DatabaseServices Microsoft.SharePoint.Portal.Topology.DatabaseServiceCollection Gets the list of DatabaseService objects associated with the Server object.
DocumentServices Microsoft.SharePoint.Portal.Topology.DocumentServiceCollection Gets the list of DocumentService objects associated with the Server object.
Expiration System.DateTime Gets or sets the expiration date of the product license on the Server object.
IndexServices Microsoft.SharePoint.Portal.Topology.IndexServiceCollection Gets the list of IndexService objects associated with the Server object.
IsJobServer Boolean Gets a value indicating whether the Server object is a background job server.
LocalExpiration System.DateTime Gets the expiration date of the product license on the Server object. Use the Expiration property.
Name String Gets or sets the name of the Server object.
SearchServices Microsoft.SharePoint.Portal.Topology.SearchServiceCollection Gets the list of SearchService objects associated with the Server object.
SmtpServices Microsoft.SharePoint.Portal.Topology.SmtpServiceCollection Gets the list of SmtpService objects associated with the Server object.
TeamWebServices Microsoft.SharePoint.Portal.Topology.TeamWebServiceCollection Gets the list of TeamWebService objects associated with the Server object.
WebServices Microsoft.SharePoint.Portal.Topology.WebServiceCollection Gets the list of WebService objects associated with the Server object.

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

Use the Server class to manage server computers in the topology of a server farm. A single server can host multiple services and components in a deployment of Microsoft Office SharePoint Portal Server 2003. In a single-server deployment of SharePoint Portal Server, all service and component objects reside on the single server. In a multi-server deployment of SharePoint Portal Server, called a server farm, service and component objects are distributed across multiple servers to provide load balancing, scalability, and fault tolerance. Individual servers may be connected in such a way that they appear to represent a single resource.

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