DeploymentBaseOptions Class

IIS 7.0

Provides the base set of options for a deployment context.

System..::..Object
  Microsoft.Web.Deployment..::..DeploymentBaseOptions

Namespace:  Microsoft.Web.Deployment
Assembly:  Microsoft.Web.Deployment (in Microsoft.Web.Deployment.dll)

[SerializableAttribute]
public ref class DeploymentBaseOptions : ISerializable

The DeploymentBaseOptions type exposes the following members.

  NameDescription
Public methodDeploymentBaseOptions()()()()Creates an instance of a DeploymentBaseOptions object.
Protected methodDeploymentBaseOptions(SerializationInfo, StreamingContext)
Top

  NameDescription
Public propertyAuthenticationTypeGets or sets a string that determines the type of authentication to use in the deployment operation.
Public propertyComputerNameGets or sets the name of the computer.
Public propertyDefaultProviderSettings
Public propertyEncryptPasswordGets or sets the encrypted password.
Public propertyIncludeAclsGets or sets a value that indicates whether security descriptors will be added to the deployment context.
Public propertyLinkExtensionsGet an enumerable collection of DeploymentLinkExtension objects.
Public propertyPasswordGets or sets the password used to access the deployment location.
Public propertyPrefetchPayloadGets or sets a value that indicates whether a deployment request contains a prefetch payload.
Public propertyRetryAttemptsGets or sets the number of times to attempt a deployment operation.
Public propertyRetryIntervalGets or sets the interval, in milliseconds, to wait between retry attempts.
Public propertySkipDirectivesGets a collection of DeploymentSkipDirective objects.
Public propertyTempAgent
Public propertyTraceLevelGets or sets the trace level of the deployment base options.
Public propertyUserNameGets or sets the username used to access the deployment location.
Public propertyWebServerConfiguration
Top

  NameDescription
Public methodAddDefaultProviderSetting
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectDataDeserializes an instance of the current class.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

  NameDescription
Public eventTraceAn event to indicate when a deployment trace event has occurred.
Top

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: