ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
Connections, Commands, And Procedures
What is ASP?
VBScript Classes: Part 1 of N

Reduce Web Form Spam by Checking Server Variables
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

Quick Tips

Be Sure You Disabled Debugging

You've probably heard that you shouldn't deploy applications with debugging enabled. Even the default error message that tells you how to enable debugging has a warning in it reminding you to disable it again before you deploy your application. But how are you going to be sure you never forget?

Well here's a quick and easy way to be sure all your production applications run with debugging disabled. Take a look at the retail attribute of the deployment element in the system.web section of your web server's machine.config file. By default your machine.config file is located in something like C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG and if you open it up and look for the deployment element you won't find one. The lack of an entry is equivalent to the following:

  <deployment retail="false" />

But if you add the entry and switch the setting to true:

  <deployment retail="true" />

you'll be rewarded with a production environment which doesn't allow tracing, custom errors, or debugging. Not only does this ensure your applications will perform as they should, it also locks down some information which could be advantageous to potential hackers. For example, with the retail attribute set to "true", run-time error messages no longer display the ASP.NET version in their footer as they otherwise would.

For more information, check out the documentation for the Deployment Element (ASP.NET Settings Schema) on MSDN.

Now you can debug to your heart's content on your development machine and still rest easy that your applications are performing their best on the server.

Previous      Show All Tips      Next

If you have a tip you would like to submit, please send it to:

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers