To troubleshoot the problems in the program, the developers usually start debug mode in web.config, which will make ASP.NET produce the extra information such as debug symbols, metadata and so on .However, it will take much more time to compile and run the program, which will consume more memory and cause resource caching to be unenforceable .Therefore, we should set the debug as “false” to avoid the impact on performance .There are two methods to make it.
(1) In web.config file, we should set“<compilation debug=”false”/>”.
(2)In Machine.config, Enable <compilation debug=”false”/> and switch for all ASP.NET applications on the system in production by setting the following codes:
<system.web>
<deployment retail=”true”/>
</system.web>
This setting in machine.config is to close trace output in a page and detailed error messages remotely. The more information can be found in http://msdn.microsoft.com/zh-cn/library/ms228298(VS.80).aspx