SPSite 成员

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.

SPSite 类型公开以下成员。

构造函数

  名称 说明
公共方法 SPSite(Guid) Initializes a new instance of the SPSite class based on the specified ID for a site collection.
公共方法 SPSite(String) Initializes a new instance of the SPSite class based on the specified 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.

页首

属性

  名称 说明
公共属性 AdministrationSiteType Represents administration site types supported by SharePoint Foundation.
公共属性 AllowCreateDeclarativeWorkflow
公共属性 AllowDesigner Used to assign or retrieve the Site Collection Allow Designer property.
公共属性 AllowExternalEmbedding Setting that controls external domain embedding for this site collection
公共属性 AllowMasterPageEditing Used to assign or retrieve the Site Collection property that allows master page editing.
公共属性 AllowRevertFromTemplate Used to assign or retrieve the Site Collection property that allows reverting from a template.
公共属性 AllowRssFeeds Gets a Boolean value that specifies whether the site collection allows RSS feeds.
公共属性 AllowSaveDeclarativeWorkflowAsTemplate
公共属性 AllowSavePublishDeclarativeWorkflow
公共属性 AllowSelfServiceUpgrade whether version to version upgrade is allowed on this site.
公共属性 AllowSelfServiceUpgradeEvaluation whether upgrade evaluation site collection is allowed.
公共属性 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.
公共属性 Archived whether the site is in archived mode.
公共属性 Audit Gets an audit store that is attached to the site collection.
公共属性 AuditLogTrimmingCallout Gets or sets the class name of the object that performs audit log trimming.
公共属性 AuditLogTrimmingRetention Gets or sets the number of days of audit log data to retain.
公共属性 AverageResourceUsage the average resource usage of the site collection over the configured window in days.
公共属性 BrowserDocumentsEnabled Indicates whether the documents can be opened in a browser or not.
公共属性 Cache A thread-safe cache that may be used to store very small amounts of data associated with this SPSite.
公共属性 CanUpgrade Property indicating whether or not this object can be upgraded.
公共属性 CatchAccessDeniedException 仅供内部使用。 Use the CatchAccessDeniedException property instead to specify whether SharePoint Foundation traps and handles “Access Denied” exceptions.
公共属性 CertificationDate Gets the date and time on which use of the site collection was confirmed for automatic deletion.
公共属性 CompatibilityLevel Gets the major version of this site collection for purposes of major version-level compatibility checks.
公共属性 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.
公共属性 CurrentResourceUsage Indicates the current resource usage of 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.
公共属性 DenyPermissionsMask This property will deny the rights specified by the permission mask to all users of the site collection including the site collection admin. The elevated process identity is the only exception that has full rights
公共属性 EvalSiteId The identity of upgrade evaluation site collection, if there was one create using this site collection. Otherwise it is empty Guid value.
公共属性 EventReceivers Provides event receivers for events that occur at the scope of the site collection.
公共属性 ExpirationDate Specifies the date after which an upgrade evaluation site collection will automatically be deleted.
公共属性 FeatureDefinitions Gets the collection of feature definitions for the site collection.
公共属性 Features Gets the collection of SPFeature objects that are associated with the site collection.
公共属性 FileNotFoundUrl Get SPSite swerver relative Url or absolute URL to file not found page. This value is used as redirect URL for HTTP request where the resource can not be found.
公共属性 GlobalPermMask 已过时。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.)
公共属性 HasAppPrincipalContext Whether this [SPSite] object is running within an app principal context. When the [SPSite] object is running within an app principal context, the request permission may be restricted by the app principal's permission, even if the [SPSite] object is created with System account.
公共属性 HideSystemStatusBar whether the site's system status bar should be hidden.
公共属性 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.
公共属性 InheritAllowSelfServiceUpgradeEvaluationSetting whether the AllowSelfServiceUpgradeEvaluation value is inherit from parent.
公共属性 InheritAllowSelfServiceUpgradeSetting whether the AllowSelfServiceUpgrade value is inherit from parent.
公共属性 IsEvalSite Indicates if the site collection is an upgrade evaluation site collection or not
公共属性 IsPaired 已过时。Gets a Boolean value that indicates whether the site collection is paired with its parent.
公共属性 IsReadLocked Sets or gets, a value that specifies whether the site collection is locked and unavailable for Read access.
公共属性 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.
公共属性 MaintenanceMode whether the site is in maintenance mode
公共属性 NeedsUpgrade Property indicating whether or not this object needs to be upgraded.
公共属性 OutgoingEmailAddress
公共属性 Owner Gets or sets the owner of the site collection. (Read-only in 沙盒解决方案.)
公共属性 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. (Read-only in 沙盒解决方案.)
公共属性 PortalUrl Gets or sets the URL to a portal. (Read-only in 沙盒解决方案.)
公共属性 PrimaryUri
公共属性 Protocol Gets the protocol that is used by the server.
公共属性 Quota Gets or sets a quota for the site collection.
公共属性 ReadLocked 此成员仅供内部使用,不能直接在您的代码中使用。 Use the IsReadLocked property instead.
公共属性 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.
公共属性 RequiredDesignerVersion
公共属性 ResourceQuotaExceeded Indicates whether the resource quota limit for this site collection has been exceeded since the last daily quota reset or not.
公共属性 ResourceQuotaExceededNotificationSent Indicates whether a resource quota exceeded notification was sent (or not) for this site collection since the last daily quota reset.
公共属性 ResourceQuotaWarningNotificationSent Indicates whether a resource quota warning notification was sent or not for this site collection since the last daily quota reset.
公共属性 RootWeb Gets the root Web site of the site collection.
公共属性 SchemaVersion Gets the version of this site collection for purposes of fine-grained upgrade compatibility checks.
公共属性 ScriptSafeDomains Returns the collection of script safe external domains for this site collection
公共属性 ScriptSafePages Returns the collection of script safe internal pages for this 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. (Read-only in 沙盒解决方案.)
公共属性 ServerRelativeUrl Gets the server-relative URL of the root Web site in the site collection.
公共属性 ShareByEmailEnabled ShareByEmailEnabled when true means that user's will be able to grant permissions to guests for resources within the site collection
公共属性 ShareByLinkEnabled Property indicates whether that user's will be able to share links to documents that can be accessed without logging in
公共属性 ShowURLStructure Indicates whether to show the site collection URL structure.
公共属性 SiteSubscription Gets the subscription to which this site collection belongs.
公共属性 Solutions Gets the collection of user solutions that have been activated for the site collection.
公共属性 SourceSiteId Specifies the Source site Id for an Upgrade evaluation 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.
公共属性 TrimAuditLog Gets or sets a value that specifies whether to remove excess from the audit log periodically.
公共属性 UIVersionConfigurationEnabled 已过时。Gets or sets a Boolean value that specifies whether to enable the visual upgrade user interface (UI) for changing the UI version of the site collection.
公共属性 UpgradeContext Property for additional upgrade context.
公共属性 UpgradeInfo
公共属性 UpgradeRedirectUri 已过时。Gets an object representation of the upgrade redirect uniform resource identifier (URI) of the site collection.
公共属性 UpgradeReminderDate
公共属性 Upgrading Specifies whether the site is currently upgrading.
公共属性 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.
公共属性 UserCodeEnabled Gets a value that indicates whether the user code service is enabled for the site collection.
公共属性 UserCustomActions Gets the SPUserCustomActionCollection object that contains a list of SPUserCustomAction objects that are assigned to this site.
公共属性 UserDefinedWorkflowsEnabled Gets or sets a Boolean value that indicates whether user-defined workflows are enabled.
公共属性 UserIsSiteAdminInSystem whether the current user is site collection admin in the system (before readonly mode trim applied)
公共属性 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 SharePoint Foundation Web application to which the site collection belongs.
公共属性 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.

页首

方法

  名称 说明
公共方法 AddWorkItem(Guid, DateTime, Guid, Guid, Guid, Int32, Boolean, Guid, Guid, Int32, [], String, Guid) Adds a work item to the site collection.
公共方法 AddWorkItem(Guid, DateTime, Guid, Guid, Guid, Int32, Boolean, Guid, Guid, Int32, [], String, Guid, Boolean) 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.
公共方法 CreatePreviewSPSite Creates a temporary evaluation SPite for this SPite, for the purposes of determining whether upgrade is likely to be successful.
公共方法 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.
公共方法 Delete(Boolean, Boolean) Deletes the site collection from the server, optionally removes the site collection users from Active Directory Domain Services (ADDS), and optionally uses a timer job to delete the site collection gradually.
公共方法 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 (从 Object 继承。)
公共方法静态成员 Exists(Uri) Returns a Boolean value that indicates whether the specified site collection exists.
公共方法静态成员 Exists(Uri, Boolean) Determines if a site with the specified uri exists. Checks the config db cache and, additionally, checks the content database if checkContentDb is true.
公共方法 ExtendUpgradeReminderDate extend the upgrade reminder date for this SPSite by the days specified at WebApplication.UpgradeReminderDelay
受保护的方法 Finalize (从 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 default number of 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).
公共方法 GetFeaturesIfLoaded If the features have been loaded for the site, this will return them. If they have not yet been loaded, this call will return null (and will not have any round trip incurred)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetRecycleBinItems Returns a collection of recycle bin items based on the specified query.
公共方法 GetRecycleBinStatistics Gets both the number of items in the recycle bin and its size.
公共方法 GetReusableAclForScope Returns the reusable access control list (ACL) for the specified scope.
公共方法 GetSelfServiceSiteCreationSettings Gets the settings that are used for Self-Service Site Creation.
公共方法 GetType (从 Object 继承。)
公共方法 GetUrls Retrieve all the URLs for the site collection, including both Primary URL and all Secondary URLs
公共方法 GetVisualReport Retrieves a list of SPSite.WebVisualReport objects for all Web sites in this site collection and their corresponding visual upgrade data.
公共方法 GetWebTemplates(UInt32) Returns the collection of site definitions that are available for creating Web sites within the site collection.
公共方法 GetWebTemplates(UInt32, Int32) 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.
公共方法 HasEvalSite Determines if a site collection has an upgrade evaluation site or not.
公共方法 Invalidate IUpgradable Interface implementation
公共方法静态成员 InvalidateCacheEntry Removes the specified cache entry and returns a Boolean value that indicates whether the entry was cached.
公共方法 IsScriptSafe Validates the specified uri against the script safe settings of the site collection and returns true if safe, false if not
公共方法静态成员 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 (从 Object 继承。)
公共方法 NeedsUpgradeByType true if the object needs to be upgraded; otherwise, false.
公共方法 OpenWeb() Returns the Web site that is associated with the URL that is used in an SPSite constructor.
公共方法 OpenWeb(Guid) Returns the Web site with the specified GUID.
公共方法 OpenWeb(String) Returns the Web site that is located at the specified server-relative or site-relative URL.
公共方法 OpenWeb(String, SPSiteOpenWebOptions) Returns the Web site that is located at the specified server-relative or site-relative URL and applies specified options to it.
公共方法 OpenWeb(String, Boolean) Returns the Web 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.
公共方法 QueryFeatures(Guid) Gets a collection of the features deployed in this site collection that have a specific definition identifier.
公共方法 QueryFeatures(Guid, Boolean) Gets a collection of the features deployed in this site collection that have a specific definition identifier, including only features that either do or do not need to be upgraded.
公共方法 QueryFeatures(Guid, Version) Gets a collection of the features deployed in this site collection that have a specific definition identifier and a specific version.
公共方法 QueryFeatures(SPFeatureScope, Boolean) Gets a collection of the features deployed in this site collection with either Site or Web scope, including only features that either do or do not need to be upgraded.
公共方法 RecalculateStorageMetrics
公共方法 RecalculateStorageUsed Recalculates the storage that is used by the site collection.
公共方法 RefreshEmailEnabledObjects Refreshes the email–enabled objects of the site collection.
公共方法 RemoveUrl This is the body of removing a secondary URL from site collection.
公共方法 Rename Changes the URL of a host-header-named site collection to a new URL.
公共方法 RunHealthCheck
公共方法 RunUpgradeSiteSession
公共方法 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.
公共方法 SelfServiceCreateSite(String, String, String, UInt32, Int32, String, String, String, String, String, String, String, String)
公共方法 SelfServiceCreateSite(String, String, String, UInt32, String, String, String, String, String, String, String, String, SPSiteSubscription) Creates a site collection by using Self-Service Site Creation based on the specified quota template and other specified information (see parameter list).
公共方法 SelfServiceCreateSite(String, String, String, UInt32, Int32, String, String, String, String, String, String, String, String, SPSiteSubscription) Creates a site collection by using Self-Service Site Creation based on the specified quota template and other information.
公共方法 SetUrl Set secondary URL and zone for the site collection. If the URL exist for the site collection, then we only update the zone for the existing URL. If the URL does not exist, we will add the URL and the zone for the site collection.
公共方法 StorageManagementInformation 已过时。Returns information about storage management for the site collection.
公共方法 ToString Returns the name of the site collection. (覆盖 Object.ToString()。)
公共方法 UpdateClientObjectModelUseRemoteAPIsPermissionSetting
公共方法 UpdateValidationKey Updates the key that is used to generate the form digest validation of the site collection.
公共方法 Upgrade() Upgrades this object
公共方法 Upgrade(Boolean) Upgrades this object
公共方法静态成员 ValidateDomainCompatibility(String, String) Verifies whether two URLs point to the same site collection, even if the domain portions of the URLs are different.
公共方法静态成员 ValidateDomainCompatibility(SPSite, SPSite) Verifies that two URLs have compatible domains.
公共方法 VisualUpgradeWebs 已过时。Updates all Webs in this site to the new SharePoint UI.

页首

  名称 说明
公共域静态成员 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.

页首

另请参阅

引用

SPSite 类

Microsoft.SharePoint 命名空间