Sharepoint: Invalid slug header for BLOBs. Slug headers must be server- or web-relative URL of the file. RRS feed

  • Question

  • Hi,

    i want to use the rest odata webservice of sharepoint to add files and create folders on sharepoint. I generated a service out of  http://<host>/_vti_bin/listdata.svc" and tried to add a new folder. The user has enough access rights, because with the sharepoint ui i can create folder.

    If i execute this code i get this exception:


    System.Data.Services.Client.DataServiceClientException: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code></code> <message xml:lang="de-DE">Ungültige Platzhalterkopfzeile für Blobs. Platzhalterkopfzeilen müssen server- oder webrelative URLs der Datei sein. Serverrelative URLs beginnen mit einem Schrägstrich ("/").</message> </error> bei System.Data.Services.Client.DataServiceContext.SaveResult.<HandleBatchResponse>d__1e.MoveNext()

    ------------------------------- CODE --------------------------------------------

                    PRG.Abrechnung.Dms.CRMDocsTestDataContext proxy = new PRG.Abrechnung.Dms.CRMDocsTestDataContext(new Uri("http://spscrm01praml:88/websites/CRMDocsDev/_vti_bin/listdata.svc"));

                    proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; // new MyCredentials();
                    GeschäftspartnerItem newItem = new GeschäftspartnerItem();
                    newItem.Name = "Blum Bernd";


    Somebody has an idea to solve this problem ?

    • Edited by Markus Benz Wednesday, December 11, 2013 8:28 AM
    Wednesday, December 11, 2013 8:27 AM