Delen via


CReplicationClientError.Destination Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets or sets the name of the destination server where the Commerce Server Staging (CSS) error occurred.

object Destination { set; get; }

Return Value

A string that contains the name of the destination server.

Remarks

The CReplicationClientError.Destination property corresponds to the COM property named ReplicationClientError.Destination.

Example

The following example tries to send a file. If there are any errors, it displays the names of the servers where the errors occurred.

CReplicationClient replicationClient = new CReplicationClient();
replicationClient.Initialize("Project1");
try
{
    replicationClient.SendFile("myfile.htm");
}
catch (System.Runtime.InteropServices.COMException)
{
    object[] errors = (object[])replicationClient.GetExtendedErrorInfo();
    // If the ClientError array is not empty, loop through it and display each error
    int numElements = errors.Length;
    if (numElements > 0)
    {
        Console.WriteLine("Could not send file to destination(s):");
        for (int i = 0; i < numElements; i++)
        {
          Console.WriteLine(((CReplicationClientError)errors[i]).get_Destination());
        }
    }
}

See Also

Other Resources

How to Replicate Individual Files

How to Retrieve Individual File Replication Errors

Individual File Replications

CReplicationClient.GetExtendedErrorInfo Method

CReplicationClientError Class