SPVirtualServerConfig.SelfServiceSiteCreationEnabled property
NOTE: This API is now obsolete.
取得或設定 Boolean 值,以指定是否在虛擬伺服器上啟用自助網站架設。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.", _
False)> _
Public Property SelfServiceSiteCreationEnabled As Boolean
Get
Set
'用途
Dim instance As SPVirtualServerConfig
Dim value As Boolean
value = instance.SelfServiceSiteCreationEnabled
instance.SelfServiceSiteCreationEnabled = value
[ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.",
false)]
public bool SelfServiceSiteCreationEnabled { get; set; }
Property value
Type: System.Boolean
true如果啟用自助網站架設。
Examples
下列程式碼範例會在指定的虛擬伺服器上啟用自助網站架設。
Dim globalAdmin As New SPGlobalAdmin()
Dim uri As New System.Uri("http://Server_Name")
Dim vServer As SPVirtualServer = globalAdmin.OpenVirtualServer(uri)
Dim vConfig As SPVirtualServerConfig = vServer.Config
vConfig.SelfServiceSiteCreationEnabled = True
vConfig.Properties.Update()
globalAdmin.Close()
SPGlobalAdmin globalAdmin = new SPGlobalAdmin();
System.Uri uri = new System.Uri("http://Server_Name");
SPVirtualServer vServer = globalAdmin.OpenVirtualServer(uri);
SPVirtualServerConfig vConfig = vServer.Config;
vConfig.SelfServiceSiteCreationEnabled = true;
vConfig.Properties.Update();
globalAdmin.Close();