SPVirtualServer Class
The SPVirtualServer class represents the top-level object for a virtual server in Microsoft Windows SharePoint Services.
System.Object
Microsoft.SharePoint.Administration.SPVirtualServer
Public Methods
The following table shows the public methods of the SPVirtualServer class and a brief description of each.
Name | Description |
---|---|
GetWebTemplates | Returns the collection of site templates for the server specified by locale ID. |
MakeFullUrl | Converts the server-relative URL of a site to an absolute URL that includes the name of the server. |
UpdateMailSettings | Updates settings on the Simple Mail Transfer Protocol (SMTP) server that are used for e-mail on the virtual server. |
Public Properties
The following table shows the public properties of the SPVirtualServer class, the data type of each property, and a brief description of each.
Name | Data type | Description |
---|---|---|
ApplicationPoolId | String | Gets the ID of the application pool used in Microsoft Internet Information Services (IIS). |
CatchAccessDeniedException | Boolean | Gets or sets a Boolean value that specifies whether to handle access denied exceptions and require user authentication. |
Config | Microsoft.SharePoint.Administration.SPVirtualServerConfig | Gets the configuration settings for the virtual server. |
ContentDatabases | Microsoft.SharePoint.Administration.SPContentDatabaseCollection | Gets the collection of content databases on the virtual server. |
Description | String | Gets the description for the virtual server, which is displayed in the Internet Information Services (IIS) management console. |
HostName | String | Gets the host name for the virtual server. |
IISInstanceId | Int32 | Gets the instance ID of Internet Information Services (IIS). |
MailCodePage | Int32 | Gets the language code page used for e-mail messages. |
MailFromAddress | String | Gets the From address used for e-mail sent by the server. |
MailReplyToAddress | String | Gets the To address used for e-mail sent to the server. |
OutboundSmtpServer | String | Gets the name of the Simple Mail Transfer Protocol (SMTP) server used for outbound e-mail. |
Port | Int32 | Gets the port number for the virtual server. |
PresenceEnabled | Boolean | Gets a Boolean value that indicates whether inline presence information is enabled on the virtual server. |
Sites | Microsoft.SharePoint.Administration.SPSiteCollection | Gets the collection of all site collections on the virtual server. |
State | Microsoft.SharePoint.Administration.SPVirtualServerState | Gets an SPVirtualServerState constant representing the state of the virtual server. |
Url | System.Uri | Gets the URL for the virtual server. |
Version | System.Version | Gets the version of Microsoft Windows SharePoint Services installed on the virtual server. |
VirtualServerId | System.Guid | Gets the GUID for the virtual server. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
Remarks
Use the VirtualServer property of either the SPSiteCollection class or the SPVirtualServerConfig class to return an SPVirtualServer object that represents the virtual server. Otherwise, use the VirtualServers property of the SPGlobalAdmin class to return all the virtual servers in the deployment of Windows SharePoint Services, and then use an indexer to return a single server from the collection. For example, if the collection is assigned to a variable named myVirtualServers, use myVirtualServers[index]
in C#, or myVirtualServers(index)
in Visual Basic .NET, where index is the index number of the server in the collection.
Requirements
Namespace: Microsoft.SharePoint.Administration
Platforms: Microsoft Windows Server 2003
Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)
Security: Code Access Security