In this example we will look at how to use the deployment configuration element on production servers hosting ASP.NET web applications to automatically configure trace, custom errors and compilation settings.
Add the deployment element and set attribute retail=”true” to automatically configure:
- trace element: enabled=”false”
- customErrors element: mode=”RemoteOnly”
- compilation element: debug=”false”
You can set it in the machine.config so that it is server wide or per website in the web.config.