SPSite Members
Include Protected Members
Include Inherited Members
Represents a collection of sites in a Web application, including a top-level Web site and all its subsites. Each SPSite object, or site collection, is represented within an SPSiteCollection object that consists of the collection of all site collections in the Web application.
The SPSite type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SPSite(Guid) | Initializes a new instance of the SPSite class based on the specified GUID for a site collection and the default URL zone (SPUrlZone.Default). | |
SPSite(String) | Initializes a new instance of the SPSite class based on the specified absolute URL. | |
SPSite(Guid, SPUrlZone) | Initializes a new instance of the SPSite class based on the specified site collection GUID and URL zone. | |
SPSite(Guid, SPUserToken) | Initializes a new instance of the SPSite class based on the specified site collection GUID and user token. | |
SPSite(String, SPUserToken) | Initializes a new instance of the SPSite class based on the specified absolute URL and user token. | |
SPSite(Guid, SPUrlZone, SPUserToken) | Initializes a new instance of the SPSite class based on the specified site collection GUID, URL zone, and user token. |
Top
Properties
Name | Description | |
---|---|---|
AllowRssFeeds | Gets a Boolean value that specifies whether the site collection allows RSS feeds. | |
AllowUnsafeUpdates | Gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation. | |
AllWebs | Gets the collection of all Web sites that are contained within the site collection, including the top-level site and its subsites. | |
ApplicationRightsMask | Gets the rights mask for the parent Web application of the site collection. | |
Audit | Gets an audit store that is attached to the site collection. | |
CatchAccessDeniedException | Infrastructure. Use the CatchAccessDeniedException property instead to specify whether Windows SharePoint Services traps and handles Access Denied exceptions. | |
CertificationDate | Gets the date and time on which use of the site collection was confirmed for automatic deletion. | |
ContentDatabase | Gets the content database that is associated with the site collection. | |
CurrentChangeToken | Gets the change token that will be used to log the next change to the site collection. | |
DeadWebNotificationCount | Gets the number of notifications that have been sent about Web sites within the site collection that are out of use. | |
ExternalBinaryIds | Gets an SPExternalBinaryIdCollection object that is used to retrieve the IDs of external binary large object (BLOB) files that are contained in the external BLOB store provider (EBS Provider). | |
Features | Gets the collection of SPFeature objects that are associated with the site collection. | |
GlobalPermMask | Obsolete. Use the ApplicationRightsMask property to get the rights mask for the Web application instead. (In Windows SharePoint Services 2.0, the GlobalPermMask property got the rights for the permissions mask that was used globally on the virtual server.) | |
HostHeaderIsSiteName | Gets a Boolean value that specifies whether the host header is used instead of the server-relative path to uniquely identify the site collection. | |
HostName | Gets the name of the server that hosts the site collection. | |
ID | Gets the GUID that identifies the site collection. | |
IISAllowsAnonymous | Gets a Boolean value that indicates whether anonymous access is enabled in Microsoft Internet Information Services (IIS). | |
Impersonating | Gets a Boolean value that indicates the impersonation status of the SPSite object. | |
IsPaired | Gets a Boolean value that indicates whether the site collection is paired with its parent. | |
LastContentModifiedDate | Gets the date and time in Coordinated Universal Time (UTC) when the content of the site was last changed. | |
LastSecurityModifiedDate | Gets the date and time in Coordinated Universal Time (UTC) when security on the site was last changed. | |
LockIssue | Gets or sets the comment that is used in locking a site collection. | |
Owner | Gets or sets the owner of the site collection. | |
Port | Gets the port number that is used for input and output on the virtual server that contains the site collection. | |
PortalName | Gets or sets the name of a portal. | |
PortalUrl | Gets or sets the URL to a portal. | |
Protocol | Gets the protocol, HTTP or HTTPS, that is used by the server. | |
Quota | Gets or sets a quota for the site collection. | |
ReadLocked | Gets or sets a Boolean value that specifies whether the site collection is locked and unavailable for Read access. | |
ReadOnly | Gets or sets a Boolean value that specifies whether the site collection is read-only, locked, and unavailable for write access. | |
RecycleBin | Gets the collection of recycle bin items for the site collection. | |
RootWeb | Gets the root Web site of the site collection. | |
SearchServiceInstance | Gets an SPServiceInstance object that represents an instance of the SharePoint Search service that is associated with the site collection. | |
SecondaryContact | Gets or sets the secondary contact that is used for the site collection. | |
ServerRelativeUrl | Gets the server-relative URL of the root Web site in the site collection. | |
SyndicationEnabled | Gets or sets a Boolean value that specifies whether RSS syndication is enabled for the site collection. | |
SystemAccount | Gets the system account of the site collection. | |
UpgradeRedirectUri | Gets an object representation of the upgrade redirect uniform resource identifier (URI) of the site collection. | |
Url | Gets the full URL to the root Web site of the site collection, including host name, port number, and path. | |
Usage | Gets information about site usage, including bandwidth, storage, and number of visits to the site collection. | |
UserAccountDirectoryPath | Gets or sets the provider-specific user account directory path for the site collection. | |
UserToken | Gets the user token that is associated with the site collection. | |
WarningNotificationSent | Gets a Boolean value that indicates whether a warning notification has been sent. | |
WebApplication | Gets the parent SharePoint Web application for the site collection. | |
WorkflowManager | Gets the SPWorkflowManager object that is associated with the site collection, enabling you to centrally control the workflow templates and instances across the site collection. | |
WriteLocked | Gets or sets a Boolean value that specifies whether the site collection is locked and unavailable for Write access. | |
Zone | Gets the URL zone that was specified in the constructor that was used to create the current SPSite object. |
Top
Methods
Name | Description | |
---|---|---|
AddWorkItem | Adds a work item to the site collection. | |
BypassUseRemoteApis | Bypasses using SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the site collection. | |
CheckForPermissions | Checks the permissions for a given set of rights and throws an Unauthorized Access exception if the permission check fails. | |
Close | Closes the site collection and releases resources. | |
ConfirmUsage | Certifies that the site collection is in use. | |
Delete() | Deletes the site collection from the server. | |
Delete(Boolean) | Deletes the site collection from the server and removes the site collection users from Active Directory Domain Services (ADDS) if bDeleteADAccounts is true. | |
Dispose | Releases all unmanaged resources that are used by the site collection object. | |
DoesUserHavePermissions(SPReusableAcl, SPBasePermissions) | Returns a Boolean value indicates whether the user has permissions for the specified set of rights. | |
DoesUserHavePermissions(SPReusableAcl, SPBasePermissions, SPWeb) | Returns a Boolean value that indicates whether the user has permissions for the specified Web site and set of rights. | |
Equals | (Inherited from Object.) | |
Exists | Returns a Boolean value that indicates whether the specified site collection exists. | |
Finalize | (Inherited from Object.) | |
GetAllReusableAcls() | Returns the reusable access control lists (ACLs) for the site collection. | |
GetAllReusableAcls(Int32) | Returns the reusable access control lists (ACLs) of the site collection up to a specified limit. | |
GetCatalog | Returns the list template gallery, site template gallery, Web Part gallery, master page gallery, or other galleries from the site collection, including custom galleries that are defined by users. | |
GetChanges() | Returns the first 1000 changes listed in the current change log for the site collection. | |
GetChanges(SPChangeQuery) | Returns a collection of changes from the change log filtered by the specified query. | |
GetChanges(SPChangeToken) | Returns a collection of changes, starting from a particular point in the change log. | |
GetChanges(SPChangeToken, SPChangeToken) | Returns a collection of changes that have been logged over a specified period of time. | |
GetCustomListTemplates | Returns the collection of custom list templates, which are created by end users, from the specified site. | |
GetCustomWebTemplates | Returns the collection of site templates for the site collection based on the specified locale ID (LCID). | |
GetEffectiveRightsForAcl(SPReusableAcl) | Returns the actual permissions that the current user has for the specified Access Control List (ACL). | |
GetEffectiveRightsForAcl(SPReusableAcl, SPWeb) | Returns the actual permissions that the current user has for the specified access control list (ACL). | |
GetHashCode | (Inherited from Object.) | |
GetRecycleBinItems | Returns a collection of recycle bin items based on the specified query. | |
GetRecycleBinStatistics | Returns the number of items in the recycle bin and its size as output parameters. | |
GetReusableAclForScope | Returns the reusable access control list (ACL) for the specified scope. | |
GetSelfServiceSiteCreationSettings | Returns the settings that are used for Self-Service Site Creation. | |
GetType | (Inherited from Object.) | |
GetWebTemplates | Returns the collection of site definitions that are available for creating Web sites within the site collection. | |
GetWorkItems | Returns the individual work items, number of columns, and number of rows in the specified work item collection as output parameters. | |
InvalidateCacheEntry | Removes the specified cache entry and returns a Boolean value that indicates whether the entry was cached. | |
LookupUriInRemoteFarm | Returns the Uniform Resource Identifier (URI) of a Web site in the specified remote server farm. | |
MakeFullUrl | Returns the full URL for the specified server-relative URL. | |
MemberwiseClone | (Inherited from Object.) | |
OpenWeb() | Returns the site that is associated with the URL that is used in an SPSite constructor. | |
OpenWeb(Guid) | Returns the site with the specified GUID. | |
OpenWeb(String) | Returns the site that is located at the specified server-relative or site-relative URL. | |
OpenWeb(String, Boolean) | Returns the site that is located at the specified server-relative or site-relative URL based on a Boolean value that specifies whether the exact URL must be supplied. | |
RecalculateStorageUsed | Recalculates the storage that is used by the site collection. | |
RefreshEmailEnabledObjects | Refreshes the e-mailed–enabled objects of the site collection. | |
Rename | Changes the URL of a host-header-named site collection to a new URL. | |
SelfServiceCreateSite(String, String, String, UInt32, String, String, String, String, String, String, String) | Creates a site collection by using Self-Service Site Creation. | |
SelfServiceCreateSite(String, String, String, UInt32, String, String, String, String, String, String, String, String) | Creates a site collection by using Self-Service Site Creation based on the specified quota template and other information. | |
StorageManagementInformation | Returns information about storage management for the site collection. | |
ToString | Returns the name of the site collection. (Overrides Object.ToString().) | |
UpdateValidationKey | Updates the key that is used to generate the form digest validation of the site collection. | |
ValidateDomainCompatibility | Verifies whether two URLs point to the same site collection, even if the domain portions of the URLs are different. |
Top
Fields
Name | Description | |
---|---|---|
MaxFullUrlLength | Represents the maximum number of characters that can be used in the absolute URL for a site collection. | |
MaxWebNameLength | Represents the maximum number of characters that can be used in site names for the site collection. |
Top