cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
In need of some #MondayMotivation? Read more

API V2 Issue with C# : DropBoxClient.Users.GetCurrentAccountAsync doesn't return

62 Views
2 Comments
0 Kudos
Highlighted
Level 2

API V2 Issue with C# : DropBoxClient.Users.GetCurrentAccountAsync doesn't return

Hi,

 

I recently migrate from API v1 to API v2.

 

I use the Dropbox nugget for C#.

 

Everything was working fine in september (with this new API v2 code) but since today (or the 1st of october) my new code doesn't work.

 

Here is the code :

 

using (dbx = new DropboxClient(Token))
{
var full = await dbx.Users.GetCurrentAccountAsync();
string DropBoxName=System.IO.Path.GetFileName(Filename);
await Upload(Filename, "/" + DropBoxName);
}

 

In fact dbx.Users.GetCurrentAccountAsync(); doesn't return, without any message/error/timeout/exception... Any idea ?

2 Replies
Dropboxer

Re: API V2 Issue with C# : DropBoxClient.Users.GetCurrentAccountAsync doesn't return

Nothing appears wrong with your call to GetCurrentAccountAsync, and if anything goes wrong you should certainly get some sort of error. I just tried it anyway and it worked for me (except that I don't have your Upload definition).

 

You don't appear to be using the return value `full` in this code though, and you also included calls to `GetFileName` and `Upload`. How are you checking that it's hanging on `GetCurrentAccountAsync` in particular and not one of the others?

Level 2

Re: API V2 Issue with C# : DropBoxClient.Users.GetCurrentAccountAsync doesn't return

Found the problem ! My assembly was working fine in a small c# project but the issue comes from a security callback added to ServicePointManager.ServerCertificateValidationCallback in the other project (to check server side certificate).

 

Problem fixed !