SPVirtualServer class

NOTE: This API is now obsolete.

Obsolete. Use the SPWebApplication class or the SPIisSettings class instead. (In Windows SharePoint Services 2.0, the SPVirtualServer class represented the top-level object for a virtual server in SharePoint Foundation, and is maintained for backward compatibility.)

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPVirtualServer

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.",  _
    False)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class SPVirtualServer
'Usage
Dim instance As SPVirtualServer
[ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.", 
    false)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPVirtualServer

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 Microsoft SharePoint Foundation, 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, where index is the index number of the server in the collection.

Thread safety

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

See also

Reference

SPVirtualServer members

Microsoft.SharePoint.Administration namespace