Share via


CReplicationClient.Disconnect Method

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

Closes the connections to the destination servers that are defined for the Commerce Server Staging (CSS) project.

Note

This method and the CReplicationClient object are used only to stage individual files. You cannot use this method to stage projects.

void Disconnect()

Remarks

You must have CSS administrator or operator rights on the project to call this method.

This method performs an implicit commit operation. Therefore, you do not have to call the Commit method after you call the Disconnect method.

If you use the SendFile, SendFiles, and DeleteFile methods without the Connect and Disconnect methods, the SendFile, SendFiles, and DeleteFile methods each perform their own connect and disconnect operations. By using the Connect and Disconnect methods, you can avoid this overhead, which can be significant when you update several files.

The CReplicationClient.Disconnect method corresponds to the COM method named ReplicationClient.Disconnect.

Example

The following example deletes the file oldfile.htm and sends the file newfile.htm to the Project1 destination servers, and then disconnects from the destination servers.

CReplicationClient replicationClient = new CReplicationClient();
replicationClient.Initialize("Project1");
replicationClient.Connect();
replicationClient.DeleteFile("oldfile.htm");
replicationClient.SendFile("newfile.htm");
replicationClient.Disconnect();

See Also

Other Resources

CReplicationClient.Connect Method

CReplicationClient Class