none
SharePoint Create Folder fails randomly with CSOM RRS feed

  • Question

  • I have implemented an upload process for SharePoint with C# in Azure Functions and CSOM. The upload process will also create folders in SharePoint recursive.

    The following error will be thrown after some folders are created:

    {"parameters.Content, parameters.ContentStream\r\nParameter name: The specified value is not supported for the parameters.Content, parameters.ContentStream parameter"}.


    Code (dest is the destination context):

    Folder _folder = dest.Web.GetFolderByServerRelativeUrl(folder.ServerRelativeUrl);
    _folder.Folders.AddWithOverwrite(folder.ServerRelativeUrl+"/"+item.Property.Name,true);
    dest.Load(_folder);
    dest.ExecuteQuery();


    Tuesday, April 20, 2021 2:00 PM

All replies