I finally have the Crash Reports working again with CodeSmith’s Insight. The release of MVC 3 provided a new way to deal with errors using the HandleErrorAttribute. The changes to the Global.asax.cs file look something like this: Application_Start protected void Application_Start() { AreaRegistration.RegisterAllAreas(); // Added this when converting to MVC 3 RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); […]
Archive for February 4th, 2011
MVC 3 Breaks Error Tracking in CodeSmith Insight
Filed under: Technology | Tags: CodeSmith, Insight, Unit Testing
Unit Testing HandleErrorAttribute
Filed under: Technology | Tags: ASP.NET, MVC, Unit Testing
Code Analysis doesn’t like the former MVC pattern of using a catch for all errors when updating a model. I wanted to use the HandleError attribute to deal with errors, but how should I unit test it? There are several keys to having the HandleError attribute work: Must decorate the Action with [HandleError] Must have […]
SmtpClient.Dispose() Bummer
Filed under: Technology | Tags: .NET 4.0, Code Analysis, Unit Testing
Headline: You will need to put in some try/catch logic when you call dispose on the SmtpClient. I was working on getting rid of some of my code analysis warnings – “Warning 10 CA2000 : Microsoft.Reliability : In method ‘AccountMembershipService.SendActivationEmail(HttpContextBase, string, Guid, string, string)’, object ‘client’ is not disposed along all exception paths. Call System.IDisposable.Dispose […]
I was “Thinking” of venturing out… not now.
It doesn’t look that bad where I live, but I thought I should check the Houston Transtar Traffic Map. Glad I did – I’ve never seen this many little red exclamation points! Update: The first red ! I moused over were accidents. But when I went back, many were just “ice on roadway”… I think […]