This project is read-only.

List directory with WebDav over SSL not working

Mar 31, 2013 at 9:24 AM

I try to list all entries in a folder. But I get an exception SharpBoxException with message 'File not found'. I'm using a WebDav connection to LiveDrive over ssl (see following code). I have test the same WebDav connection with WebDav and works fine.

Here my code:
// Creating the cloudstorage object
CloudStorage cloudStorage = new CloudStorage();

var uri = new Uri("");

var boxnetConfig = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.WebDav, uri);

// building credentials for the service
var webDavCredentials = new GenericNetworkCredentials();

// set the information you got from the enduser
webDavCredentials.UserName = "michael.salzig@xxx.xx";
webDavCredentials.Password = "myPassword";

var storageToken = cloudStorage.Open(boxnetConfig, webDavCredentials);

var publicFolder = cloudStorage.GetFolder("/Test");

foreach (var fof in publicFolder)
  // check if we have a directory
  bool bIsDirectory = fof is ICloudDirectoryEntry;
  // output the info
  Console.WriteLine("{0}: {1}", bIsDirectory ? "DIR" : "FIL", fof.Name);
I hope I can get help from anyone.