Currently Browsing: ASP.NET

Phil’s 10 Rules for the treatment of Exceptions

You know what I love, Exceptions. Exceptions are awesome. They’re an awesome tool that simplify post-mortem debugging, help developers code against and understand the internal workings of an API and they help prevent applications getting into a corrupt state. Even though exceptions are so invaluable, a lot of the time they’re poorly understood, abused, ignored and forgotten. I hope that I can earn some respect for the venerable exception, by setting down some rules on how they should be treated. Phil’s 10 rules for the treatment of Exceptions: Throw early, throw often[1] This is key...
read more

Advanced exception handling in ASP.NET

Logging exceptions is crucial in ASP.NET applications. If you don’t have logging, who knows what could be going wrong with your application. Your users could be getting hundreds of errors without you even knowing if you don’t have popper logging set up in your application. Most sites get the basics right for logging, but there are some circumstances which can easily be missed. For example, I worked on a site a couple of years ago, and we hadn’t quite got our error logging right. We also had an issue that during deploy time, thousands of error where being generated because we...
read more