Freigeben über


Web.CreateAnonymousLink-Methode

Create an anonymous link which can be used to access a document without needing to authenticate.

Namespace:  Microsoft.SharePoint.Client
Assemblys:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Shared Function CreateAnonymousLink ( _
    context As ClientRuntimeContext, _
    url As String, _
    isEditLink As Boolean _
) As ClientResult(Of String)
'Usage
Dim context As ClientRuntimeContext
Dim url As String
Dim isEditLink As Boolean
Dim returnValue As ClientResult(Of String)

returnValue = Web.CreateAnonymousLink(context, _
    url, isEditLink)
public static ClientResult<string> CreateAnonymousLink(
    ClientRuntimeContext context,
    string url,
    bool isEditLink
)

Parameter

  • url
    Typ: System.String

    The URL of the site, with the path of the object in SharePoint represented as query string parameters, forSharing set to 1 if sharing, and mbypass set to 1 to bypass any mobile logic. For example:

    https://contoso.com/?forSharing=1&mbypass=1&List=%7BCF908473%2D72D4%2D449D%2D8A53%2D4BD01EC54B84%7D&obj={CF908473-72D4-449D-8A53-4BD01EC54B84},1,DOCUMENT
    
  • isEditLink
    Typ: System.Boolean

    If true, the link will allow the guest user edit privileges on the item.

Rückgabewert

Typ: Microsoft.SharePoint.Client.ClientResult<String>
The string for the anonymous link.

Siehe auch

Referenz

Web Klasse

Web-Member

Microsoft.SharePoint.Client-Namespace