When the retail attribute is set to true, ASP.NET disables trace output, disables debug capabilities, and disables detailed system-generated error messages for remote users. For applications that have a customErrors element in the application Web.config file, the mode attribute is forced to On. These settings override any settings that are made in application Web.config files.
Note that you should continue to set the debug attribute to false in application’s Web.config files that are deployed to the server. The debug setting disables request execution timeout, and this is not overridden by the retail setting.
For the purpose of setting the deployment retail attribute in all the machine.config files (for all the .NET Frameworks installed) on several remote machines, I wrote two PowerShell functions:
Get-DeploymentRetailMode and Set-DeploymentRetailMode. These can be run in several ways, for example:
These function will be available in your PowerShell scope, after you "dot source" the script:
or inside the script file of course.
The functions are available in the Configure-DeploymentRetail.ps1 script, posted in the TechNet script gallery.
For more details on the deployment retail attribute, see: https://msdn.microsoft.com/en-us/library/ms228298(VS.80).aspx
For more details on the debug mode in ASP.NET applications, see https://support.microsoft.com/en-us/kb/2580348