Delen via


CReplicationServer.AddRoute Method

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

Adds a route to the Commerce Server Staging (CSS) routing table for the server.

object AddRoute(string route)

Parameters

  • route
    The name of the route to add. Route names must consist of alphanumeric characters and must not exceed 49 characters.

Return Value

A new CReplicationRoute object.

Remarks

You must have CSS administrator permissions to call this method.

You can set the properties of the CReplicationRoute object, but the object is not created until you call the CReplicationRoute.Commit method on the new route.

The CReplicationServer.AddRoute method corresponds to the COM method named ReplicationServer.AddRoute.

Example

The following example creates a new route named Default and sets the base directory for this route to D:\Stress.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");
  CReplicationRoute replicationRoute = (CReplicationRoute)replicationServer.AddRoute("Default");
  replicationRoute.set_BaseDirectory(@"D:\Stress");
  replicationRoute.Commit();

See Also

Other Resources

Routes

How to Manage Routes

CReplicationServer.EnumRoutes Method

CReplicationRoute.Commit Method

CReplicationServer Class