public static void SetTenantData(string language) { try { using (var backupClient = new BackupServiceClient()) { int tenantID = CoreContext.TenantManager.GetCurrentTenant().TenantId; BackupResult result = null; do { if (result == null) { result = backupClient.RestorePortal(tenantID, language); } else { result = backupClient.GetRestoreStatus(tenantID); } Thread.Sleep(TimeSpan.FromSeconds(5)); } while (!result.Completed); //Thread.Sleep(TimeSpan.FromSeconds(15)); // wait to invalidate users cache... } var apiServer = new ApiServer(); apiServer.CallApiMethod(SetupInfo.WebApiBaseUrl + "/crm/settings", "PUT"); } catch (Exception error) { LogManager.GetLogger("ASC.Web").Error("Can't set default data", error); } }