DeploymentBaseOptions Class
IIS 7.0
Provides the base set of options for a deployment context.
Assembly: Microsoft.Web.Deployment (in Microsoft.Web.Deployment.dll)
The DeploymentBaseOptions type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DeploymentBaseOptions()()()() | Creates an instance of a DeploymentBaseOptions object. |
![]() | DeploymentBaseOptions(SerializationInfo, StreamingContext) |
| Name | Description | |
|---|---|---|
![]() | 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 |
| Name | Description | |
|---|---|---|
![]() | AddDefaultProviderSetting | |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetObjectData | Deserializes an instance of the current class. |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
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);
}
}
}
Show:
