Share via


SPVirtualServerConfig.SelfServiceSiteCreationRequireContact property

NOTE: This API is now obsolete.

Gets or sets a Boolean value that specifies whether a secondary contact is required when using Self-Service Site Creation.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.",  _
    False)> _
Public Property SelfServiceSiteCreationRequireContact As Boolean
    Get
    Set
'Usage
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 if a secondary contact is required; otherwise, false.

Examples

The following code example enables Self-Service Site Creation on a specified virtual server and requires use of a secondary contact.

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();

See also

Reference

SPVirtualServerConfig class

SPVirtualServerConfig members

Microsoft.SharePoint.Administration namespace