vb.net error when "storage.Open(Configuration, credentials)"

Jun 25, 2011 at 2:04 PM

i would like to ask can vb.net use sharpbox??

when i compile this "If not (cbool(val(storage.Open(Configuration, credentials)))) Then" will error

it said that dropboxToken can not be convert to boolean.

help me~~

Coordinator
Jun 26, 2011 at 10:11 AM
Hi,

yes it's usable in VB.Net. Something like this should work:

Module Module1

Sub Main()

Dim storage As AppLimit.CloudComputing.SharpBox.CloudStorage
Dim token As ICloudStorageAccessToken

Dim dropBoxConfiguratuon As ICloudStorageConfiguration
Dim dropBoxCredentals As AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.DropBoxCredentials

dropBoxConfiguratuon = AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.DropBoxConfiguration.GetStandardConfiguration()
dropBoxCredentals = New AppLimit.CloudComputing.SharpBox.StorageProvider.DropBox.DropBoxCredentials()
dropBoxCredentals.ConsumerKey = "YOURAPIKEY"
dropBoxCredentals.ConsumerSecret = "YOURAPISECRET"
dropBoxCredentals.UserName = "USERNAME"
dropBoxCredentals.Password = "PASSWORD"

storage = New CloudStorage()

token = storage.Open(dropBoxConfiguratuon, dropBoxCredentals)
If (IsDBNull(storage)) Then
Console.WriteLine("open failed")
End If


End Sub

End Module


Dirk


2011/6/25 faifai12347893 <notifications@codeplex.com>

From: faifai12347893

i would like to ask can vb.net use sharpbox??

when i compile this "If not (cbool(val(storage.Open(Configuration, credentials)))) Then" will error

it said that dropboxToken can not be convert to boolean.

help me~~

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 26, 2011 at 1:20 PM

thanks, i g0t that

Jun 29, 2011 at 12:34 PM

Hello I would like to implement a dropbox upload / download of a single file with fixed name from specific folder in the dropbox can someone post a sample code or help me with this, BDW my app is in vb.net (visual studio 2010)

Coordinator
Jun 29, 2011 at 3:32 PM
Hi,

just extend the sample code I posted in this discussion with the upload and download method. If you want to up/download only files from you local drive use the comfort methods which are documented in our documentation section as well (How to download a file).

Thanks
Dirk


2011/6/29 zona <notifications@codeplex.com>

From: zona

Hello I would like to implement a dropbox upload / download of a single file with fixed name from specific folder in the dropbox can someone post a sample code or help me with this, BDW my app is in vb.net (visual studio 2010)

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com