Proper Error Handling in a Web Application

Was checking out the supersport mobile site when an exception was thrown into my face, with a full stack trace.
[ATTACH=full]63909[/ATTACH] [ATTACH=full]63910[/ATTACH] [ATTACH=full]63911[/ATTACH]
This is an example of how not to handle errors and exceptions

I have a very low opinion of ASP.NET for web applications. Sijui kwanini. Naskiaga tu IIS security this .NET efficiency that.

For a framework to throw such an alert, there is an error in the application code. Its not intentional and this kind of an alert is meant for developer not the user. This is generally a problem for applications made by large corporations and companies. It results from having tests lead development, TDD. tests pass so you assure yourself that the application works, but you haven’t taken time to use every bit of the application to make sure it responds properly. Software incompatibilities, database inconsistencies, outdated modules, and small untested bits result to this kind of shit. function testing is much better and less tedious. If done exhaustively, its very effective.

ouch, wonder what the supersport mobile web service exposes

The guy has not specified the right .Net framework for the app,being a developer I get such errors due to pressure to release and app.Remember development house nowadays don’t give you a tester,they want you to design,develop,test,deploy and maintain

TDD is mostly effective. And it’s main purpose is to ensure easy maintainability of legacy code but not essentially to prevent errors. Of course test coverage has to be 100%. Actually most corporates locally don’t do TDD or BDD or any kind of automates testing.

The simple solution is to disable debug log output and replace with a generic error message. Then get the output from the logs.

Some developers purposely enable logging since the do actual development of the production environment which is a really bad practice.