Jaa


CReplicationProject.Get Method

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

Gets the value of a specified property that is defined for a Commerce Server Staging (CSS) project.

object Get(string propName)

Parameters

  • propName
    The name of the property. Property names are not case-sensitive. The following table lists valid property names.

    Property name

    Description

    AfterReceiveScript

    Specifies the path and file name of a script to run after content is received.

    AfterSendScript

    Specifies the path and file name of a script to run after content is sent.

    BeforeReceiveScript

    Specifies the path and file name of a script to run before content is received.

    BeforeSendScript

    Specifies the path and file name of a script to run before content is sent.

    BusinessProject

    Specifies whether the project is to stage business data (1) or not (0).

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option is required only for business data staging projects.

    CreateVirtualRoot

    Specifies whether the Web content project will be staged to a virtual root directory (YES) or not (NO).

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects.

    Comments

    Contains comments for the staging project.

    Destination

    Specifies the destinations for the project. A destination can be a server name, a route name, or a directory. Multiple destinations may be specified. For a project to be staged, at least one destination must be specified for the project that is defined on the source staging server.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    Route names and directories cannot be specified for Internet Information Services (IIS) metabase projects.

    This property may be empty depending on the project type.

    ExcludeDir

    Specifies a directory to exclude from staging.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects. You define this option only on the source staging server.

    Filter

    Specifies the filters to use to include or exclude specific assets, such as files or directories, in a Web content staging project. The following options are available for specifying filters:

    +<filter>Includes the file or directory filter.
    -<filter>Excludes the file or directory filter.
    \Applies the filter to directories.
    ...\Applies the filter to all subdirectories.
    <filter>A file or directory filter that can use wildcard characters.

    For example, the following filter will include text1.txt, exclude all .exe files in the project root directory, exclude the directory dir1, and include all .jpg files in the whole directory tree:

    "Filter", +"text1.txt" –"*.exe" –"dir1\" +"...\*.jpg""
    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects. You define filters only on the source staging server.

    Flags

    Specifies a bitmask that enables or disables one or more flags. For a list of flag values, see CSS API Flags.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    Most flags apply only to Web content staging projects.

    LocalDirectory

    For Web content and business data projects, specifies the path of a directory. The directory must be specified in the form <drive>:\<path>, for example, Get("LocalDirectory", @"C:\NewDirectory").

    For Web content projects, this property specifies the source directory that contains the files to be replicated and the endpoint directory where files will be transmitted.

    For IIS metabase projects, this property specifies the name of the Web site from which the IIS metabase will be replicated.

    For business data projects, this property specifies the directory to use to temporarily store data that is staged.

    MailTo

    Specifies the e-mail address that will receive notifications when a staging project succeeds or fails, for example, CSSAdmin@adventure-works.com.

    MailToFail

    Specifies the e-mail address that will receive notifications when a staging project fails, for example, CSSAdmin@adventure-works.com.

    MailToSuccess

    Specifies the e-mail address that will receive notifications when a staging project succeeds, for example, CSSAdmin@adventure-works.com.

    MapUrl

    Specifies the URL to which the destination maps. This is comparable to specifying the Virtual directory to be assigned to the project option in the user interface.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content projects.

    MetabaseReplication

    Specifies whether the project is defined to update the IIS metabase (YES) or not (NO).

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option is required only for IIS metabase staging projects.

    SkipLockedFiles

    Specifies how CSS will manage the replication of locked files. If this option is set to YES, CSS will skip the replication of files locked on the source or overwrite a file on the target if it is locked or currently being used. If this option is set to NO and files are being used, the replication will fail.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects. You define this option only on the source staging server.

    TransactionMethod

    Specifies whether to enable transactional staging (YES) or not (NO).

    When you set this option, the endpoint server maintains a copy of the Web content for each project that is staged on that server. Enable this option in case you want to revert to the original Web content. When you enable this option, you must make sure that you have sufficient disk space to support the storage of Web content projects. If, for example, you decide to keep three rollbacks, you must have enough hard disk space for at least three versions of the content.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects. You define this option only on endpoint servers. If you enable this option, use the SetGlobal command (RollbacksToKeep parameter) to define the number of rollbacks to keep on the server.

    Username

    Specifies the user name for the default authentication account to use when authenticating against other CSS servers, for example, contoso\CSSUser.

    VRootAttributes

    Specifies the user rights that are set on the virtual directory. Valid user rights are the following:

    • R=Allow read access.

    • W=Allow write access.

    • E=Allow execute access.

    • S=Allow script access.

    • B=Allow directory browsing.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects.

    VRootWebSiteName

    Specifies the relative path of the physical directory to map to the virtual directory of the Web site defined for the project. Make sure that you include a slash mark (/) at the start of the path.

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects.

    WaitApply

    Specifies whether timed release is enabled (YES) or disabled (NO).

    Bb498358.alert_note(en-US,CS.70).gifNote:
    This option applies only to Web content staging projects and to projects that are defined on an endpoint server.

Return Value

The value of the specified property.

Remarks

To define a CSS project property, see the CReplicationProject.Put method.

The CReplicationProject.Get method corresponds to the COM method named ReplicationProject.Get.

Example

The following example gets the value of the TransactionMethod property for the project named MyProject.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");
  CReplicationProject replicationProject = (CReplicationProject)replicationServer.OpenProject("MyProject", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);
  string transactionEnabled = (string)replicationProject.Get("TransactionMethod");
  if (transactionEnabled == "Yes")
      Console.WriteLine("MyProject uses transaction processing.");
  else
      Console.WriteLine("MyProject does not use transaction processing.");

See Also

Other Resources

Projects

How to Create and Modify a Staging Project

How to Retrieve Project Information

CReplicationProject.Put Method

CReplicationProject Class