Reasons to release build your web applications before you deploy them with ASP.NET:
According to MSDN web developer tips, you can choose one of the following to release build your web application:
<system.web><deployment retail="true"/></system.web>
✅ The setting in machine.config will also turn off trace output in a page and detailed error messages remotely
Machine.config file is typically located at %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG.