Skip to main content

Checkup Documentation

Disable debugging (.NET code)

severity-high code-web-config-debug-enabled

Summary

ASP.NET Debug mode is often used in development environments, but sometimes used when troubleshooting issues in production environments. It is extremely useful in development environments but can cause significant performance problems as well as potential security issues. Here we are looking at your root web.config's system.web compilation node for the debug attribute.


Check Logic

Constant Care for Kentico will ensure the debug attribute in the web.config file is false (default)

You can manage your settings for this checkup in the Constant Care for Kentico admin settings.


Resolution

To confirm this setting you will want to look for the following code in your root web.config file. We recommend this be set to false on production environments as it can greatly reduce performance.

You can find more information on debugging you can visit Microsoft's information on the subject here: 

https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications?view=vs-2019

How to create a web.config transformations for release mode:
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/web-config-transformations

Not sure what to do?

If you are ever unsure about making changes to your site, we encourage you to reach out to your Kentico Xperience Gold Partner. If you do not have a partner, then feel free contact the Constant Care For Kentico team to get connected with an expert.