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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

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