Share via


Enable the Use of Defaults Using AppFabric Cmdlets

This topic describes how to enable the use of default configuration settings for a service by using AppFabric cmdlets. When defaults are enabled, the service will use the merged chain of nameless behaviors in the IIS hierarchy. The service will inherit configuration settings from all levels in the IIS hierarchy. For more information, see Configuration Process in AppFabric.

You should configure defaults in the following order:

  • Configure server defaults

  • Configure site defaults

  • Import and then configure applications

  • Configure the services that the applications contain.

The reason for this order is that configuring the defaults at a level can cause the entire tree to recycle. This should be done before any application actually runs to avoid the cost of recycling applications.

For more information about executing cmdlets, see Running AppFabric Cmdlets.

To enable the use of default configuration settings for a service

In the AppFabric Windows PowerShell console, execute the Set-ASAppServiceBehaviorName cmdlet with the BehaviorName parameter set to an empty string to enable the use of default configuration settings. This ensures that the merged configuration settings for the scopes with default settings will be used for the service, in addition to the service’s own configuration settings.

Cmdlet: Set-ASAppServiceBehaviorName

Syntax options:

Syntax 1

Set-ASAppServiceBehaviorName [-SiteName] <String> [-VirtualPath] <String> -BehaviorName <String> [-Confirm] [-WhatIf] [<CommonParameters>]

Syntax 2

Set-ASAppServiceBehaviorName [-Uri] <Uri> -BehaviorName <String> [-Confirm] [-WhatIf] [<CommonParameters>]c

Syntax 3

Set-ASAppServiceBehaviorName -BehaviorName <String> -ServiceObject <ServiceInfo> [-Confirm] [-WhatIf] [<CommonParameters>]
Parameter Description

-SiteName <String> –VirtualPath <String>

Name and path of a site, application, directory, or service, resulting in the use of the corresponding Web.config file as the basis of operation of the cmdlet.

-Uri <Uri>

Identifier of a specific service or application, resulting in the use of the corresponding Web.config file as the basis of operation of the cmdlet.

-ServiceObject <ServiceInfo>

Name of a service object, which results in the use of the corresponding Web.config file as the basis of operation of the cmdlet.

-BehaviorName

If you set the value of <String> to an empty string (“”), the service will take its configuration settings from values merged from the nameless behaviors of the application, site, and server Web.config files. For more information, see Configuration Process in AppFabric.

-Confirm

If present, prompts you for confirmation before executing the command.

-WhatIf

If present, displays a message that describes the effect of the command, instead of executing the command.

  2012-09-12