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

SPPrefix Class

Represents a specified relative URL that is used to determine segments of the URL under which SPSite objects may be created.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPPrefix : SPAutoSerializingObject

Use the Prefixes of the SPWebApplication class to return the collection of prefixes for a Web application.

Use an indexer to return a single prefix from the collection. For example, if the collection is assigned to a variable named myPrefixes, use myPrefixes[index] in C#, or myPrefixes(index) in Visual Basic, where index is the index number of the prefix in the collection.

When a request to the Web application is received by the Web server, SharePoint Foundation examines the URL path of the request to determine whether the request should be handled by SharePoint Foundation or by IIS. Inclusions specifywhat URL paths are handled by SharePoint Foundation.

There are two types of prefixes, wildcard and explicit. An explicit inclusion means that that the URL represents a site. A wildcard inclusion means that the inclusion plus every segment after it represents a site. For example, the explicit inclusion '/' indicates that the root of the Web application is a site. The wildcard inclusion 'sites' indicates that /sites/Site1 and /sites/Site2 are both sites. Exclusions are obsolete and are ignored. Any file or path that is defined in the metabase is automatically excluded by SharePoint Foundation.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.