I want to use more than 1 Dropbox Account in my Application. After Authorizing an Account, i cannot create a new Account with DoAuth. I got every time the Message in the Webbrowser to Allow my Application to use the previous created account.
Furthermore i saw, that in the Destructor of CloudDropbox that you did not free the HttpServer. So the Port is already blocked, when i free the Component
The DropBox component is the owner of the HttpServer so, the HttpServer is automatically destroyed when its owner is destroyed. When you create a new DropBox instance, you can have this instance connect again to another DropBox account.
Sorry, but this did not work. If i Destroy the Component during runtime, recreate a new one and try to connect, i got every time the error, that the port is already used. This happens, because the HttpServer will not be closed gracefully.
No. Our Customer want to use different DropBox Accounts with the Same Appkey. The First Authentication works well. But, when i logout and than try to login, i got the Message that the Address is already in use, when i destroy the component after logout. When i only Logout and try to Authenicate i got the Message in the Webbrowser, that the "Application would like to access Files or Folders in your Dropbox".
The Same happens, when i copy the Url from the HttpServer and Paste it in the IE. Here it looks like, that Dropbox cashes the Ip Address and want to connect to the same Account.
Thank you for your advice. You are right. I called the Logout Method of my component which uses the AdvDropbox, GDrive... and the Logout Method of Dropbox was not called. Sorry. After correction it works now.
Only one point did not work, When i authenticate a Dropbox Account, Logout and try to Authenticate a GDrive Account, i got the Error "Address already in use". I tried to destroy the Dropbox Component before i authenticate to GDrive with the Same Result.
I tested than with the following Code in Dropbox:
destructor TAdvDropBox.Destroy;
begin
// CHANGED: WIN568
if not Assigned(Owner) and Assigned(FHTTPServer) then
begin
FHttpServer.Active := false;
FHttpServer.Free;
FHttpServer := nil;
end;
// CHANGED: WIN568
inherited;
end;
and this works. The problem here is, that after Authentication the HttpServer is still active. Even after Destruction of the Component the Port was blocked.