There is no Web named "/personal/firstname_lastname_mycompany_com/Documents/_vti_bin/sites.asmx" An unhandled exception of type '' occurred in Īdditional information: Cannot contact site at the specified URL If I try to run the same code above, this time I get the following exception thrown. This code works fine for returning a list of folders within the Documents folder, however, my problem is trying to list the contents of one of these folders. Var list = GetDocumentLibrary(libraryName, clientContext, web) Public List ListFolders(string libraryName, ClientContext clientContext, Web web) Var query = clientContext.LoadQuery((p => p.Title = libraryName)) Public List GetDocumentLibrary(string libraryName, ClientContext clientContext, Web web) now do something with results contained in 'folders' Var folders = ListFolders(dirPath, clientContext, web) Here's an example of listing the folders within Documents. I can successfully list all the folders in the root of Documents and download all the files in the root of the Documents folder. I am also of the impression OneDrive For Business differs enough (with it's entanglement in Sharepoint) from OneDrive. For backup purposes (as users are wonderful at accidentally deleting things they shouldn't) I'm trying to write some software to download the contents of my company's users "One Drives" to the company network so we can back them up, in case they delete anything.
0 Comments
Leave a Reply. |