This is absolutely more harm than good. Depending on in which case this exception occurs, you publish information about your system that a visitor with bad intentions can use to search for vulnerabilities.
For example, your stack trace may display errors coming from the System.Data.Sql namespace, telling the person that SQL Server will be found as part of this installation (unlike System.Data.MySql or Oracle, for example).
It also tells the person who calls .NET when an error occurs. Now, for the sake of argument, suppose that one of them had a vulnerability known only to this person - then this can be used to gain access.
All invented scenarios, obviously, or are they? ....; -)
The second opinion, which more or less agrees, is here .
source
share