Quick Start (Base64): Leaving backup mode using the web service API

The following C# code example explicitly causes a LiveCycle Server to leave backup mode and return to purging files from the Global Document Storage. (See Leaving Backup Mode on the LiveCycle server.)

/* 
    * Ensure that you create a .NET client assembly that uses  
    * base64 encoding. This is required to populate a BLOB  
    * object with data or retrieve data from a BLOB object. 
    *  
    * For information, see "Creating a .NET client assembly" in Programming with LiveCycle.   
    */ 
using System; 
 
namespace BackupRestore 
{ 
       class BackupRestoreLeave 
       { 
           [STAThread] 
           static void Main(string[] args) 
           { 
               try 
               { 
                   BackupServiceService myBackup = new BackupServiceService(); 
                   myBackup.Credentials = new System.Net.NetworkCredential("administrator", "password"); 
 
                   //Leave backup mode. 
                   BackupModeResult backupResult = myBackup.leaveBackupMode(); 
 
                   //Retrieve the results of leaving backup mode 
                   if (backupResult != null) 
                   {          
                       Console.WriteLine("The current backup ID is: " + backupResult.id); 
                   } 
                   else 
                   { 
                       Console.WriteLine("Could not leave backup mode on the LiveCycle server."); 
                   } 
               } 
               catch (Exception ee) 
               { 
                   Console.WriteLine(ee.Message); 
               } 
           } 
       } 
}