deployment Element (ASP.NET Settings Schema)

Switch View :
ScriptFree
.NET Framework General Reference
deployment Element (ASP.NET Settings Schema)

Defines configuration settings that are used to support the deployment of a Web application.


<deployment retail="true|false" />
Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

retail

Optional Boolean attribute.

Sets a value specifying whether a Web application is deployed in retail mode.

The default value is false.

This value can only be set at the machine level, not at the application level.

Child Elements

None.

Parent Elements

Element Description

configuration

The required root element in every configuration file used by the common language runtime and the .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration settings in a configuration file. Contains elements that configure ASP.NET Web applications and control how the applications behave.

Remarks

When retail is set to true, ASP.NET disables certain configuration settings such as trace output, custom errors, and debug capabilities.

Default Configuration

The following default <deployment> element is not explicitly configured in the machine configuration file, but is the default configuration returned by an application in the .NET Framework version 2.0.

<deployment retail="false" />
Example

The following example shows how to declaratively specify values for several properties of the DeploymentSection class.

<system.web>
  <deployment retail="false" />
</system.web>
Element Information

Configuration Section Handler

System.Web.Configuration.DeploymentSection

Configuration Member

System.Web.Configuration.SystemWebSectionGroup.Deployment

Configurable Locations

Machine.config

Requirements

IIS 6.0

.NET Framework 2.0

Visual Studio 2005

See Also

Tasks

How to: Configure Specific Directories Using Location Settings
How to: Lock ASP.NET Configuration Settings

Reference

system.web Element (ASP.NET Settings Schema)
configuration Element (General Settings Schema)
System.Configuration
System.Web.Configuration

Concepts

Deployment How-to and Walkthrough Topics
ASP.NET Configuration File Hierarchy and Inheritance
Securing ASP.NET Configuration
ASP.NET Configuration Scenarios

Other Resources

General Configuration Settings (ASP.NET)
ASP.NET Configuration Settings
Configuring ASP.NET Applications
ASP.NET Configuration Files
ASP.NET Configuration API

Community Content

Tom Dykstra - MSFT
See the .NET 4.0 version of this page for corrected content
The documentation is incorrect with regard to custom errors. The retail setting disables detailed system-generated error messages displayed to remote users, and for applications that have a customErrors element in their application web.config file, it overrides the mode attribute to set it to "On".

TomPester
More info about this setting

TomPester
A warning about this setting
Watch out for this gotcha 
Quote from
http://www.hanselman.com/blog/MostCommonASPNETSupportIssuesReportingFromDeepInsideMicrosoftDeveloperSupport.aspx

"For a normal debug=”false” page or site, request execution timeout is 110s or whatever alternative timeout you have specified. If you deploy with debug=”true” the timeout is effectively disabled (it is actually set to about 5 hours). The intention of this is that when you are debugging you don’t want the request timing out while you are debugging it.
Setting retail=”true” does reverse some of the debug compilation behaviour that results from having debug=”true” but it will not revert the ASP.NET runtime to enforcing the correct timeout. So if you have debug=”true” in production and your ASP.NET page happens to call something that blocks indefinitely (such as a wayward web service or database stored procedure) the ASP.NET request is not going to timeout for a very, very long time. You would be dependent on the thing you are calling timing out."

=> So retail=true does *not* revert all the evil consequences of debug=true
if retail=true and debug=true the page still runs indefinitely