SPSite.ValidateDomainCompatibility method (String, String)

Verifies whether two URLs point to the same site collection, even if the domain portions of the URLs are different.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function ValidateDomainCompatibility ( _
    site1Url As String, _
    site2Url As String _
) As Boolean
'Usage
Dim site1Url As String
Dim site2Url As String
Dim returnValue As Boolean

returnValue = SPSite.ValidateDomainCompatibility(site1Url, _
    site2Url)
public static bool ValidateDomainCompatibility(
    string site1Url,
    string site2Url
)

Parameters

  • site1Url
    Type: System.String

    A string that specifies the absolute URL of the first site collection.

  • site2Url
    Type: System.String

    A string that specifies the absolute URL of the second site collection.

Return value

Type: System.Boolean
true if the two URLs point to the same site collection; otherwise, false.

Remarks

The domain portions of the URLs that are passed might be different, for example, because of alternate access mapping.

See also

Reference

SPSite class

SPSite members

ValidateDomainCompatibility overload

Microsoft.SharePoint namespace