jQuery and ASP.NET

November 8, 2009

Disabling Debug Mode and Tracing in your ASP.NET applications




To improve the performance of our ASP.NET application, a recommended practice is to make sure that the application is not deployed with Debug=True attribute.

One of my clients had a production server which hosted multiple websites. Although some of the applications were deployed keeping debug=false, however the rest of the applications had the attribute set to true. They now wanted to control the setting from the machine.config file which would apply to all the applications running on that server.

Here’s a technique that most of the users to not know about. In your machine.config, locate the <system.web> section and add the following entry

<deployment retail=“true”/>

That’s it. Now this setting will automatically disable the debug mode and tracing on your applications.



'Like' us on our FaceBook page if you find this blog useful. Thanks!


Did you like this post?
kick it on DotNetKicks.com Save on Delicious
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

1 Response to "Disabling Debug Mode and Tracing in your ASP.NET applications"
  1. Anonymous said...
    November 11, 2009 9:07 PM

    Do you have any knowledge if setting retail = true in machine.config will show debugging as false (regardless of compile setting in web.config)

    HttpContext.Current.IsDebuggingEnabled

    I have seen some posts indicating this is an issue but nothing definitive.

 

Copyright © 2009-2011 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions