Freigeben über


DeploymentBaseOptions.IncludeAcls Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob Sicherheitsbeschreibungen dem Bereitstellungskontext hinzugefügt werden, oder legt diesen fest.

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

Eigenschaftswert

true , wenn dem Bereitstellungskontext Sicherheitsbeschreibungen hinzugefügt werden, andernfalls false.

Beispiele

Im folgenden Beispiel werden mehrere Eigenschaften der DeploymentBaseOptions -Klasse implementiert. In diesem Beispiel wird sowohl DeploymentBaseOptions für die Quell- als auch für das Zielobjekt instanziiert und die Eigenschaftswerte geändert, um einen Remotesynchronisierungsvorgang zu aktivieren.

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);  
        }  
    }  
}  

Gilt für: