Question

I am trying to create folder in my Dropbox using Sharpbox (the code is in vb.net).

I have a string variable named "str". This is the code I use:

Dim dropBoxStorage = New CloudStorage()
Dim dropBoxConfig = CloudStorage.GetCloudConfigurationEasy(nSupportedCloudConfigurations.DropBox)
Dim str As String = "TheNameForMyFolder"
Environment.ExpandEnvironmentVariables(myfilepath)
Dim srcFile = Environment.ExpandEnvironmentVariables(myfilepath)
dropBoxStorage.CreateFolder("/" + str)
Dim publicFolder = dropBoxStorage.GetFolder("/" + str)
dropBoxStorage.UploadFile(srcFile, publicFolder)

A exception happens:

An unhandled exception of type 'AppLimit.CloudComputing.SharpBox.Exceptions.SharpBoxException' occurred in AppLimit.CloudComputing.SharpBox.dll

The exception happened at this line:

dropBoxStorage.CreateFolder("/" + str)

What have I done wrong, and what shall I do instead?

Was it helpful?

Solution

You need to open the connection with dropBoxStorage.Open().

Good example is available on Codeplex (VB.NET)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top