Disabling debugging features in non-development environments
Debugging is an essential part of a web developer's task when writing code and running tests. ASP.NET Core enables developers to have easy access to a configuration that will quickly enable or disable debugging in a particular environment with configuration files or code. However, negligence or configuration mismanagement could cause debugging to be enabled in a non-development environment such as staging or production. In this recipe, we will fix the enabled debugging feature in a non-development environment.
Getting ready
For the recipes in this chapter, we will need a sample Online Banking app.
Open the command shell and download the sample Online Banking app by cloning the ASP.NET Secure Coding Cookbook repository as follows:
git clone https://github.com/PacktPublishing/ASP.NET-Core-Secure-Coding-Cookbook.git
Run the sample app to verify that there are no build or compile errors. In your command shell...