Share via


DeploymentBaseOptions Class

Definition

Provides the base set of options for a deployment context.

public ref class DeploymentBaseOptions : System::Runtime::Serialization::ISerializable
[System.Serializable]
public class DeploymentBaseOptions : System.Runtime.Serialization.ISerializable
type DeploymentBaseOptions = class
    interface ISerializable
Public Class DeploymentBaseOptions
Implements ISerializable
Inheritance
DeploymentBaseOptions
Attributes
Implements

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

Constructors

DeploymentBaseOptions()

Creates an instance of a DeploymentBaseOptions object.

DeploymentBaseOptions(SerializationInfo, StreamingContext)

Properties

AuthenticationType

Gets or sets a string that determines the type of authentication to use in the deployment operation.

ComputerName

Gets or sets the name of the computer.

DefaultProviderSettings
EncryptPassword

Gets or sets the encrypted password.

IncludeAcls

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

LinkExtensions

Get an enumerable collection of DeploymentLinkExtension objects.

Password

Gets or sets the password used to access the deployment location.

PrefetchPayload

Gets or sets a value that indicates whether a deployment request contains a prefetch payload.

RetryAttempts

Gets or sets the number of times to attempt a deployment operation.

RetryInterval

Gets or sets the interval, in milliseconds, to wait between retry attempts.

SkipDirectives

Gets a collection of DeploymentSkipDirective objects.

TempAgent
TraceLevel

Gets or sets the trace level of the deployment base options.

UserName

Gets or sets the username used to access the deployment location.

WebServerConfiguration

Methods

AddDefaultProviderSetting(String, String, Object)
GetObjectData(SerializationInfo, StreamingContext)

Deserializes an instance of the current class.

Events

Trace

An event to indicate when a deployment trace event has occurred.

Applies to