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 [...]
Posts Tagged ‘Code Analysis’
SmtpClient.Dispose() Bummer
Friday, Feb 4th, 2011 by karlz | 1 Comments
Filed under: Technology | Tags: .NET 4.0, Code Analysis, Unit Testing
Filed under: Technology | Tags: .NET 4.0, Code Analysis, Unit Testing
MVC – The Start
Wednesday, Mar 3rd, 2010 by karlz | 0 Comments
Filed under: Technology | Tags: ASP.NET, Code Analysis, MVC, Unit Testing
Filed under: Technology | Tags: ASP.NET, Code Analysis, MVC, Unit Testing
Technorati Tags: ASP.NET,MVC,Code Analysis,Unit Testing This shows my initial setup of an MVC 2 RC 2 application. Using Visual Studio 2010 RC I selected File –> New –> Project… then under Visual C#, Web, I selected the ASP.NET MVC 2 Web Application. Then when I click OK I get the following dialog. Since I’m a [...]
EF and Code Analysis
Headline: I sure wish that Code Analysis would recognize Entity Framework (EF) files as auto generated. This morning I was up early and thought I’d get rid of some of the warning in my code from Code Analysis… There is a tab in the project properties that allows you to “Suppress results from generated code”. [...]