SPVirtualServer class
NOTE: This API is now obsolete.
已過時。而是使用SPWebApplication類別或SPIisSettings類別。(在Windows SharePoint Services 2.0, SPVirtualServer類別代表在SharePoint Foundation,虛擬伺服器的最上層物件和維護回溯相容性。)
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.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class SPVirtualServer
'用途
Dim instance As SPVirtualServer
[ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.",
false)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPVirtualServer
備註
使用SPSiteCollection類別或SPVirtualServerConfig類別的VirtualServer屬性可傳回SPVirtualServer物件,代表虛擬伺服器。否則,使用SPGlobalAdmin類別之VirtualServers屬性可傳回Microsoft SharePoint Foundation,部署中的所有虛擬伺服器,然後從集合中傳回單一伺服器使用索引器。例如,若集合已指派給變數 myVirtualServers,使用myVirtualServers[index]以 C# 或 Visual Basic,其中index是索引編號集合中的伺服器中的myVirtualServers(index) 。
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.