VirtualServer Class

The VirtualServer class represents a virtual server created under the Web site node in Internet Information Services (IIS) in the topology of a server farm.

System.Object

   Microsoft.SharePoint.Portal.Topology.TopologyObjectBase

       Microsoft.SharePoint.Portal.Topology.VirtualServer

Public Constructors

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

Name Description
VirtualServer Initializes a new instance of the VirtualServer class based on the name of the specified virtual server.

Public Methods

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

Name Description
Commit(Boolean) Persists changes made to the properties of the VirtualServer object.
GetSPVirtualServer Reserved for internal use only.
GetVirtualServerUrl(String) Reserved for internal use only.

Public Properties

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

Name Data type Description
Databases Microsoft.SharePoint.Portal.Topology.DatabaseCollection Gets the list of Database objects associated with the VirtualServer object.
FromAddress String Gets or sets the From address to use for e-mail notifications.
MailEncoding System.Text.Encoding Gets or sets the encoding method to use for e-mail notifications.
Name String Gets or sets the name of the VirtualServer object.
PortalSites Microsoft.SharePoint.Portal.Topology.PortalSiteCollection Gets the PortalSite objects hosted by the VirtualServer object.
ReplyToAddress String Gets or sets the Reply To address to use for e-mail notifications.
SmtpService Microsoft.SharePoint.Portal.Topology.SmtpService Gets or sets the SmtpService object used by the virtual server.

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

A VirtualServer object corresponds to a virtual server or Web site created under the Web Site node in IIS (for example, http://Web_site_name). In IIS, one virtual server can host one or more SharePoint sites, including portal sites.

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