cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

Seb44
New member | Level 2

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 2

Greg-DB
Dropbox Staff

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?

Seb44
New member | Level 2

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 !

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Seb44 New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?