Site.Id Property

Definition

Gets or sets the unique ID of the site.

public:
 property long Id { long get(); void set(long value); };
public long Id { get; set; }
member this.Id : int64 with get, set
Public Property Id As Long

Property Value

The unique identifier for a Site object.

Remarks

If this property is not set explicitly when the user updates the configuration system with the site manager, an ID is assigned automatically. There are two methods with which the ID is calculated. If the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetMgr\Parameters\IncrementalSiteIDCreation registry key is set to a DWORD value of 1, the legacy incremental ID calculation method is used. If the registry value does not exist or is set to a DWORD value other than 1, the new hash-based ID calculation is used.

The legacy incremental ID calculation method returns the lowest available number not in use, beginning with 1. This means that an ID can be reused if a site is deleted. For example, if three sites are created by using the ID values of 1, 2, and 3, and the second site is deleted, a newly created site will be assigned a site ID of 2.

The hash-based ID calculation uses the absolute value returned from the GetHashCode method of the Name property. If the absolute value returned from the GetHashCode method of the Name property already exists as a site name, the calculated ID is then incremented until an available ID is found.

Applies to