Share via


DeploymentBaseOptions.IncludeAcls Property

Definition

Gets or sets a value that indicates whether security descriptors will be added to the deployment context.

public:
 property bool IncludeAcls { bool get(); void set(bool value); };
public bool IncludeAcls { get; set; }
member this.IncludeAcls : bool with get, set
Public Property IncludeAcls As Boolean

Property Value

true if security descriptors will be added to the deployment context, otherwise false.

Examples

The following example implements several properties of the DeploymentBaseOptions class. This example instantiates the DeploymentBaseOptions for both the source and destination objects and modifies the property values to enable a remote sync operation.

using System;  
using Microsoft.Web.Deployment;  

namespace MSDeploy.Web.Deployment  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            // Example to show how DeploymentBaseOptions can be used  
            string _directory = Environment.ExpandEnvironmentVariables(  
                @"%systemdrive%\inetpub\wwwroot");  
            DeploymentSyncOptions syncOptions =   
                new DeploymentSyncOptions();  
            DeploymentBaseOptions sourceBaseOptions =   
                new DeploymentBaseOptions();  
            sourceBaseOptions.ComputerName = "sourceMachineName";  
            sourceBaseOptions.IncludeAcls = true; // false by default  
            sourceBaseOptions.UserName = "username";  
            sourceBaseOptions.Password = "password";  
            DeploymentBaseOptions destinationBaseOptions =   
                new DeploymentBaseOptions();  
            destinationBaseOptions.ComputerName =   
                "destinationMachineName";  
            destinationBaseOptions.UserName = "username";  
            destinationBaseOptions.Password = "password";  
            DeploymentObject deploymentObject =   
                DeploymentManager.CreateObject("contentPath",   
                _directory, sourceBaseOptions);  
            deploymentObject.SyncTo(  
                DeploymentWellKnownProvider.ContentPath, _directory,  
                destinationBaseOptions, syncOptions);  
        }  
    }  
}  

Applies to