共用方式為


SPGlobalAdmin.VirtualServerNames Property

NOTE: This API is now obsolete.

Use the WebApplications property of the SPWebService class to get the collection of Web applications in the Web service instead. (In Windows SharePoint Services 2.0, the VirtualServerNames property got the names of the virtual servers in the SharePoint Foundation deployment, and is maintained for backward compatibility.)

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("SPGlobalAdmin.VirtualServers is obsolete.  Use SPWebService.ContentService.WebApplications instead.",  _
    False)> _
Public ReadOnly Property VirtualServerNames As String()
    Get
'Usage
Dim instance As SPGlobalAdmin
Dim value As String()

value = instance.VirtualServerNames
[ObsoleteAttribute("SPGlobalAdmin.VirtualServers is obsolete.  Use SPWebService.ContentService.WebApplications instead.", 
    false)]
public string[] VirtualServerNames { get; }

Property Value

Type: []
A string array that contains the names of the virtual servers.

See Also

Reference

SPGlobalAdmin Class

SPGlobalAdmin Members

Microsoft.SharePoint.Administration Namespace