You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Seb44's avatar
Seb44
New member | Level 2
8 years ago

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 ?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox 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's avatar
      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 !