I'm trying to make an application using Sharpbox for download one file of my dropbox directory. I try to download the file with the downloadFile() method, the code is:
CloudStorage dropBoxStorage = new CloudStorage();
dropBoxStorage.Open(dropBoxConfig, accessToken);
dropBoxStorage.DownloadFile(FilePath, TargetPath);
I think that dropBoxConfig and accessToken are fine because I can display the folders and files in dropbox, but when I try to download, I obtain this error:
The remote server returned an error (403) forbidden
Error en el servidor remoto: (403) Prohibido.
Help me, please. Thank you.
I had exactly the same error response when trying to download a file using DownloadFile
. Browsing the folder hierarchy or uploading files was working fine. After I found this issue on the sharpbox bug tracker I changed my .NET C# console application from framework version 4.5 to 4.0 and all of a sudden it worked.
So this tells me that sharpbox v1.2.0.542 (via NuGet) is not very stable and you might want to use another C# wrapper or write one yourself using the DropBox API directly.