When deploying ASP.NET applications to a production environment, you will most likely want to set the compilation debug attribute in web.config to false, as having debug set to true has some downsides:
- Compilation takes longer as batch optimizations are disabled
- Scripts and images from WebResources.axd will not be cached on the client
- Larger memory footprint
- Code will execute slower because of enabled debug paths
To force debug = false in all ASP.NET applications on the server, you can change the retail switch in machine.config:
<configuration>
<system.web>
<deployment retail="true"/>
</system.web>
</configuration>