共用方式為


SPVirtualServerConfig.SelfServiceSiteCreationRequireContact 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 SelfServiceSiteCreationRequireContact As Boolean
    Get
    Set
'用途
Dim instance As SPVirtualServerConfig
Dim value As Boolean

value = instance.SelfServiceSiteCreationRequireContact

instance.SelfServiceSiteCreationRequireContact = value
[ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.", 
    false)]
public bool SelfServiceSiteCreationRequireContact { get; set; }

Property value

Type: System.Boolean
true如果第二位連絡人,則需要 ;否則,請false。

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.SelfServiceSiteCreationRequireContact = 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.SelfServiceSiteCreationRequireContact = true;
vConfig.Properties.Update();

globalAdmin.Close();

請參閱

參照

SPVirtualServerConfig class

SPVirtualServerConfig members

Microsoft.SharePoint.Administration namespace