SPAlternateUrl Class

The SPAlternateUrl class represents an incoming URL and the zone with which it is associated.

System.Object

   Microsoft.SharePoint.Administration.SPAlternateUrl

Public Constructors

The following table shows the constructors of the SPAlternateUrl class and a brief description of each.

Name Description
SPAlternateUrl Initializes a new instance of the SPAlternateUrl class.

Public Properties

The following table shows the properties of the SPAlternateUrl class, the data type of each property, and a brief description of each.

Name Data Type Description
IncomingUrl String Gets the incoming URL associated with the zone of the request.
UrlZone Microsoft.SharePoint.Administration.SPUrlZone Gets the zone associated with the URL.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Use the AlternateUrls property of the SPVirtualServerConfig class to return an SPAlternateUrlCollection object that represents the collection of alternate request URLs for a virtual server. Use an indexer to return a single item from the collection. For example, if the collection is assigned to a variable named myUrls, use myUrls[index] in C# or myUrls(index) in Visual Basic .NET, where index is either the index number of the item in the collection or a string containing the incoming URL of the request.

This class becomes available through installation of Service Pack 2 for Windows SharePoint Services 2.0.

For more information about the context for using alternate request URLs, see Advanced Extranet Support.

Example

The following code example creates a URL for the Intranet zone and adds it to the collection of alternate request URLs for the zone.

For changes to take effect in this example, reset Microsoft Internet Information Services by typing iisreset at the command line.

Requirements

Namespace: Microsoft.SharePoint.Administration

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security