Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPSite.GetSelfServiceSiteCreationSettings method

Gets the settings that are used for Self-Service Site Creation.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public void GetSelfServiceSiteCreationSettings(
	out bool bIsSscEnabled,
	out bool bRequireSecondaryContact,
	out string strInclusionExclusions
)

Parameters

bIsSscEnabled
Type: System.Boolean

When this method returns, contains true if Self-Service Site Creation is enabled for the site collection; otherwise, false.

bRequireSecondaryContact
Type: System.Boolean

When this method returns, contains true if a secondary owner is required for every site that is created by using Self-Service Site Creation; otherwise, false.

strInclusionExclusions
Type: System.String

When this method returns, contains the URL namespaces in XML format that are included or excluded in the SharePoint Server application.

This method returns the settings as output parameters that are used for Self-Service Site Creation.

The following code example displays the Self-Service Site Creation settings for a specified site collection.

bool boolSSCEnabled;
bool boolReqSecondContact;
string strIncludeExclude;

using (SPSite oSiteCollection = new SPSite("http://" + System.Environment.MachineName))
{
    oSiteCollection.GetSelfServiceSiteCreationSettings(out boolSSCEnabled, out 
    boolReqSecondContact, out strIncludeExclude);

    Console.WriteLine("ssc enabled: "+ boolSSCEnabled.ToString());
    Console.WriteLine("sec contact: "+ boolReqSecondContact.ToString());
    Console.WriteLine("prefix string: "+ strIncludeExclude);
}
NoteNote

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.