May 24, 2012

Don’t run production ASP.NET Applications with debug=”true” enabled

Most important thing anybody should be aware that before deploying ASP.NET web application project in production environment set. If accidentally leave causes a number of non-optimal things to be happen.

First we discuss the causes after setting debug mode true in deploying phase then we talk about the best practice which any deplorer should follow to achieve better performance.


  1. The pages in Asp.Net takes longer time because some batch optimization are in disabled mode.

  2. The main cause is that code can execute slower at runtime because of debug mode set true.

  3. Must more memory is used within the application at runtime because one of the fact is that your images are not cached.

  4. Scripts are also not cached from WebResource.axd handler due to that mode. set a long cache policy on resources retrieved


  1. First set.

  2. Then change your project mode into release mode.

  3. Right click on solution in Solution Explorer then click on Configuration Manager.

  4. A small window open select debug mode into release mode from Active solution configuration drop down list.

  5. After rebuild your solution and then publish.