Share via


CReplicationClient.Force Property

Gets or sets a flag that determines whether Commerce Server Staging (CSS) files should be replicated even if their content has not changed since the last deployment.

Note

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

Object Force { set; get; }

Return Value

The integer 1 if all files are replicated regardless of their relative time and date stamps on the source or destination servers; 0 (zero) if only files that are newer on the source server than on a destination server are replicated to that destination server.

Remarks

You must have CSS administrator or operator rights on the project to get or set this property.

The default mode of replicating Web content files is incremental. That is, files are replicated from the source staging server to the destination servers only when the files on the source server are newer than the files on the destination servers. A Force property value of 1 specifies that CSS will replicate all files, regardless of their time and date stamps.

This property is first set for the project during a call to the Initialize method.

You can set this property at any time. The new settings do not take effect until a connect operation, which includes SendFile in connectionless mode, is performed.

The CReplicationClient.Force property corresponds to the COM property named ReplicationClient.Force.

Example

The following example forces the replication of all files for the project named Project1.

CReplicationClient replicationClient = new CReplicationClient();
replicationClient.Initialize("Project1");
replicationClient.set_Force(1);

See Also

Other Resources

CReplicationClient.Commit Method

CReplicationClient Class