Web.CreateAnonymousLinkWithExpiration 方法

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

命名空间:  Microsoft.SharePoint.Client
程序集:   Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)

语法

声明
Public Shared Function CreateAnonymousLinkWithExpiration ( _
    context As ClientRuntimeContext, _
    url As String, _
    isEditLink As Boolean, _
    expirationString As String _
) As ClientResult(Of String)
用法
Dim context As ClientRuntimeContext
Dim url As String
Dim isEditLink As Boolean
Dim expirationString As String
Dim returnValue As ClientResult(Of String)

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

参数

  • url
    类型:System.String

    The URL of the document in SharePoint.

  • isEditLink
    类型:System.Boolean

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

  • expirationString
    类型:System.String

    A date/time string that conforms to the ISO 8601:2004(E) complete representation for calendar date and time of day and which represents the time and date of expiry for the anonymous link. Both the minutes and hour value must be specified for the difference between the local and UTC time. Midnight is represented as 00:00:00. For example:

    • YYYYMMDDThhmmssZ

    • YYYYMMDDThhmmss±hhmm

    • YYYYMMDDThhmmss±hh:mm

    • YYYY-MM-DDThh:mm:ssZ

    • YYYY-MM-DDThh:mm:ss±hh:mm

    • YYYY-MM-DDThh:mm:ss±hhmm

    • A null value indicates no expiry.

返回值

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

备注

For more information, see External sharing API for SharePoint and OneDrive for Business.

另请参阅

引用

Web 类

Web 成员

Microsoft.SharePoint.Client 命名空间