Partager via


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 Windows SharePoint Services, 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

<ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.",  _
    False)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class SPVirtualServer

Dim instance As SPVirtualServer
[ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.", 
    false)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, 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 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, 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