private void UploadFile() { // Encrypted file is uplodaded to Dropbox and a record is added to the database. try { var fileBytes = File.ReadAllBytes(EncryptedFile); UserAccountManagerBLL accMan = new UserAccountManagerBLL(); if (accMan.InsertFile(Email, NameOfFile)) { _Client.UploadFile("/", NameOfFile + ".sdx", fileBytes); MessageBox.Show("Your file has been uploaded!"); } } catch (Exception) { throw; } }