CuttingEdge.Conditions source used for MongoDB .NET Driver
Since I built CuttingEdge.Conditions, I had lots of positive reactions from developers who loved it. However, I've never saw the source code been reused in another library or framework; until now.
- filed under .NET General, C#, CuttingEdge.Conditions - two comments / No trackbacks - § ¶
Breaking changes in SmtpClient in .NET 4.0
In .NET 4.0 the SmtpClient class now implements IDisposable. This is a breaking change what you should watch out for.
- filed under .NET General - No comments / No trackbacks - § ¶
Protecting against Regex DOS attacks
Bryan Sullivan describes in the May issue of his MSDN article a denial of service attack that abuses regular expressions. As Bryan explains, a poorly written regex can bring your server to its knees.
- filed under .NET General, Security - No comments / No trackbacks - § ¶
Breaking changes in .NET 4.0
Microsoft published an interesting list of breaking changes in the just released .NET 4.0 framework.
- filed under .NET General - No comments / No trackbacks - § ¶
Validator inheritance while using Validation Application Block configuration files
This article describes how to build an IConfigurationSource implementation that allows validators, defined in a base class or interface, to be inherited by subclasses and implementations.
- filed under .NET General, C#, Enterprise Library, Validation Application Block - one comment / No trackbacks - § ¶
Splitting up Validation Application Block configuration into multiple files
This article describes how to build an IConfigurationSource implementation that allows reading multiple configuration files that each contain part of the total Enterprise Library Validation Application Block configuration.
- filed under .NET General, C#, Enterprise Library, Validation Application Block - No comments / No trackbacks - § ¶
Printer Jam
The last couple of days I've been having a Printer Jam on my way to work.
- filed under Miscellaneous - one comment / No trackbacks - § ¶
Simple Service Locator - The easiest Inversion of Control framework in town
The Simple Service Locator is an easy-to-use Inversion of Control library that is a complete implementation of the Common Service Locator interface. It solely supports code-based configuration and is an ideal starting point for developers unfamiliar with larger IoC / DI libraries
- filed under .NET General, C#, Dependency injection, Simple Service Locator - seven comments / No trackbacks - § ¶
CuttingEdge.Conditions in MSDN Magazine Toolbox column
In the November 2009 issue of his MSDN Magazine Toolbox column, Scott Mitchell writes about CuttingEdge.Conditions.
- filed under CuttingEdge.Conditions - No comments / No trackbacks - § ¶
Vote for Visual Studio Text Editor Guidelines to Return
Visual Studio 2005 and 2008 contain a (not officially supported) feature that allows display of vertical guidelines in the (code) text editor. Visual Studio 2010 however, seems to completely miss this feature. I created a feature request on Microsoft Connect. Please help and vote for this feature to return.
- filed under Visual Studio - one comment / No trackbacks - § ¶
Sorting entities with the EntitySorter
This article describes the EntitySorter<T> class. It's a nifty little thing that allows the presentation layer to instruct the service layer how collections should be returned.
- filed under .NET General, C#, Entity Framework, LINQ, LINQ to SQL - two comments / No trackbacks - § ¶
Putting the Validation Application Block configuration in its own file
This article describes how to extract the validation configuration to its own file and allow this to also work with unit tests.
- filed under Enterprise Library, Validation Application Block - three comments / No trackbacks - § ¶
Integrating Enterprise Library Validation Application Block With LINQ to SQL and Entity Framework Part 4: Using Metadata to Automate Validations
This article describes how to extract information from your generated LINQ to SQL entities to automate validations like maximum string length and disallowing null values.
- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ, LINQ to SQL, O/RM, Validation Application Block - No comments / No trackbacks - § ¶
Research on botnets
I just watched an amazing Google Talk video on YouTube that explains how botnets work.
- filed under Science, Security - No comments / No trackbacks - § ¶
Preventing Cross-site Request Forgery Attacks Using ViewState
This article describes what Cross-site request forgery attacks are and how to mitigate them.
- filed under ASP.NET, C#, Security - No comments / No trackbacks - § ¶
Microsoft Anti-Cross Site Scripting Library 3.1 released
The Microsoft Anti-Cross Site Scripting Library (Anti-XSS) is an encoding library designed to help developers protect their ASP.NET web-based applications from XSS attacks.
- filed under ASP.NET, Security - No comments / No trackbacks - § ¶
NDepend
For over three years I've been using NDepend. In this post I'll describe my thoughts on NDepend.
- filed under .NET General, LINQ - No comments / No trackbacks - § ¶
CuttingEdge.Conditions version 1.0 released
Last week I published the first stable release of CuttingEdge.Conditions.
- filed under .NET General, C#, CuttingEdge.Conditions, LINQ - No comments / No trackbacks - § ¶
Removing Otherwise method from CuttingEdge.Conditions
In this post I’ll describe another breaking change I’m making to my open source project, CuttingEdge.Conditions.
- filed under .NET General, C#, CuttingEdge.Conditions, LINQ - No comments / No trackbacks - § ¶
Controversial change in CuttingEdge.Conditions
In this post I’ll describe a controversial change I’m making in my open source project, CuttingEdge.Conditions.
- filed under .NET General, C#, CuttingEdge.Conditions, LINQ - No comments / No trackbacks - § ¶
The evilness of ApplicationException
This post explains what’s wrong with ApplicationException and why it should not be used.
- filed under .NET General - No comments / No trackbacks - § ¶
Book: Microsoft .NET: Architecting Applications for the Enterprise.
Last month I read ‘Microsoft .NET: Architecting Applications for the Enterprise’, written by Dino Esposito and Andrea Saltarello. This book is a great piece of work.
- filed under .NET General, Books - No comments / No trackbacks - § ¶
Free C# 3.0 Pocket Reference ebook
Just found this free ebook on the Red Gate site:
- filed under Books, C# - No comments / No trackbacks - § ¶
Choosing FxCop rules for Line Of Business applications
Dennis Doomen, architect at Aviva Solutions, published a set of C# 3.0 Coding Guidelines a few months ago. While a lot of different C# coding guidelines can be found on the web, this one caught my attention.
- filed under .NET General, C# - No comments / No trackbacks - § ¶
Porting a LINQ to SQL to Entity Framework project
The Entity Framework Design blog just published a template that enables converting a LINQ to SQL .dbml file to a Entity Framework .edmx file.
- filed under ADO.NET, Entity Framework, LINQ, LINQ to SQL - No comments / No trackbacks - § ¶
NCover supports CuttingEdge.Conditions
The NCover team has supported my open source CuttingEdge.Conditions project by donating a license of this cool tool.
- filed under CuttingEdge.Conditions, Visual Studio - No comments / No trackbacks - § ¶
I went to the DevDays...
... and all I got was this lousy CodePlex Sticker.
- filed under default - No comments / No trackbacks - § ¶
Integrating Enterprise Library Validation Application Block with LINQ to SQL and Entity Framework Part 3: The complexity of custom validators.
This article shows the complexity a developer is facing, implementing a custom validator while using an O/RM tool. While the article uses the Validation Application Block and LINQ to SQL in writing the validation logic, the problems encountered in the article are very general.
- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ to SQL, O/RM, SQL, Validation Application Block - No comments / No trackbacks - § ¶
Protecting against XML Entity Expansion attacks
Tom Hollander describes on his blog a denial of service attack I never knew the existence of, called XML Entity Expansion attack. Tom explains how to bring a server to its knees when allowing any type of xml document as input and passing it directly to an XmlDocument for parsing.
- filed under .NET General, Security - No comments / No trackbacks - § ¶
Integrating Enterprise Library Validation Application Block with LINQ to SQL and Entity Framework Part 2: Using context within custom validators.
This article describes how to write custom validators for the Enterprise Library Validation Application Block, in such a way that it runs within the context of a specific LINQ to SQL DataContext or Entity Framework ObjectContext class, which allows analysis of non-persisted (in-memory) changes in that context.
- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ, LINQ to SQL, O/RM, Validation Application Block - two comments / No trackbacks - § ¶
Integrating Enterprise Library Validation Application Block With LINQ to SQL and Entity Framework Part 1: Basic Integration
This article describes how to integrate the Enterprise Library Validation Application Block in conjunction with an O/RM technology such as LINQ to SQL and Entity Framework.
- filed under .NET General, C#, Enterprise Library, Entity Framework, LINQ, LINQ to SQL, O/RM, Validation Application Block - eleven comments / No trackbacks - § ¶
Spell checkers for Visual Studio
One good spell checker and one really bad spell checker plug-in for Visual Studio.
- filed under .NET General, Visual Studio - one comment / No trackbacks - § ¶
The true danger of SQL Injection Attacks
This article describes the true danger of SQL injection attacks. The article shows how a hacker can steal your sensitive business data, even when your website connects to your database with a normal non-privileged login account.
- filed under Databases, Security, SQL - six comments / one trackback - § ¶
Microsoft and DevExpress announce free CodeRush Xpress for C#
This was announced some time ago at the PDC2008, but I just found out after watching the PDC session on Tips And Tracks For The Visal C# IDE.
- filed under C#, Visual Studio - No comments / No trackbacks - § ¶
The death of LINQ to SQL
The Microsoft ADO.NET team blog made an important announcement yesterday about the future of LINQ to SQL.
- filed under .NET General, ADO.NET, C#, Databases, LINQ, SQL - one comment / No trackbacks - § ¶
A Temperature struct for .NET
Did you ever wonder why .NET doesn't have a Temperature type? I suppose not, because I didn't find any implementation of such a thing on the internet.
- filed under C# - four comments / No trackbacks - § ¶
The .NET 3.5 SP1 JIT changed for worse
The .NET JIT compiler has changed with the new SP1 release of the .NET 3.5 framework. Microsoft claims it's faster. I claim the opposite!
- filed under .NET General, C# - four comments / No trackbacks - § ¶
Extending CuttingEdge.Conditions
In a previous post I introduced CuttingEdge.Conditions, a library that helps developers to write pre- and postcondition validations in their .NET 3.5 code base. In this post I'll explain how you can extend the library.
- filed under .NET General, C#, CuttingEdge.Conditions, LINQ - No comments / No trackbacks - § ¶
Introducing CuttingEdge.Conditions
CuttingEdge.Conditions is a library that helps developers to write pre- and postcondition validations in their .NET 3.5 code base. Writing these validations is easy and it improves the readability and maintainability of code.
- filed under .NET General, C#, CuttingEdge.Conditions, LINQ - seven comments / No trackbacks - § ¶
Dear C# Language Designers
Have you ever wondered why the C# language doesn't have a specific feature, or why it works the way it does? As a matter of fact, I did, and I mailed them over a year ago. I never got an answer though. Now I'm publishing this mail, hoping to start a good discussion.
- filed under C# - four comments / No trackbacks - § ¶
My Own Fluent Argument Validation Library
The last couple of days I had some spare time. What does a workaholic do with spare time? Exactly: he builds his own library. :-)
- filed under .NET General, C#, CuttingEdge.Conditions, LINQ, Visual Studio - four comments / No trackbacks - § ¶
Visual studio bug: Generic extension method doesn't show up in IntelliSense
I just reported a bug on the Microsoft Connect site about a quirk in the C# IntelliSense feature regarding generic extension methods.
- filed under .NET General, C#, LINQ, Visual Studio - two comments / No trackbacks - § ¶
Inlining of value types
Great news is coming from the .NET Runtime Team. The new coming service pack for the .NET framework addresses inlining of value types.
- filed under .NET General - No comments / No trackbacks - § ¶
Spec#, Love you long time!
I'll repeat Greg Young and Fredrik Normén here.
- filed under .NET General - No comments / No trackbacks - § ¶
Back online
My weblog was offline for a couple of days.
- filed under .NET General - one comment / No trackbacks - § ¶
Book: Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries
It has already been several months since I purchased the book Framework Design Guidelines by Krzysztof Cwalina and Brad Abrams. Since that time it proved itself to be invaluable. When you design or write reusable libraries or are concerned with the quality and usability of your API, this book is for you.
- filed under .NET General, Books - No comments / No trackbacks - § ¶
Defensive programming, Design by Contract and Spec#
- filed under .NET General, C# - No comments / No trackbacks - § ¶
ReadOnlyDictionary
This article describes an implementation of a ReadOnlyDictionary <TKey, TValue> that's missing from the .NET framework.
- filed under .NET General, C# - eleven comments / No trackbacks - § ¶
Channel 9 video: The Future of Languages
Here's a link to a very interesting Channel 9 interview with Anders Hejlsberg, Herb Sutter, Erik Meijer, Brian Beckman about Software Composability and the Future of Languages.
- filed under .NET General - No comments / No trackbacks - § ¶
C# using statement – the lazy version
While discussing the C# using statement with a colleague of mine, we discovered that there was a shorter version of the using statement possible.
- filed under C# - No comments / No trackbacks - § ¶
ASP.NET Provider Model Template for Visual Studio (download)
This article describes my Visual Studio 2005 / Visual Studio 2008 template for rolling your own custom provider on the ASP.NET 2.0 Provider model. The model is actually not restricted to ASP.NET and this template allows you to create your custom provider for every type of .NET application, including console and forms applications.
- filed under .NET General, ASP.NET, C#, Visual Studio - one comment / No trackbacks - § ¶
Converting hex to int
The easiest way to convert a hexadecimal string to an integer is using System.Convert.
- filed under .NET General, C# - No comments / No trackbacks - § ¶
The constructor conflict
Sometimes I'm wondering strange things. For instance, this morning I was wondering if a static constructor of a class can create an instance of itself. It seemed to me this would be a conflicting requirement, because a classes constructor will only run after it's static constructor has run.
- filed under C# - two comments / No trackbacks - § ¶
Book: SQL Server Query Performance Tuning Distilled
Last two months I have been reading SQL Server Query Performance Tuning Distilled (Second Edition) by Sajal Dam.
- filed under Books, Databases - one comment / No trackbacks - § ¶
Custom Parameter Gotcha
This article describes a little gotcha that might emerge when writing a custom parameter that derives from System.Web.UI.WebControls.Parameter.
- filed under ASP.NET, C# - No comments / No trackbacks - § ¶
Code Consistency With Asynchronous Exceptions
Three weeks ago Joe Duffy published an article about 'Monitor.Enter, thread aborts, and orphaned locks' on his blog. After reading this article and responding to it (see my comments), I was pretty much in shock. I came to the conclusion that the C# ‘using’ statement isn't 100% safe.
- filed under .NET General, C# - two comments / No trackbacks - § ¶
Nested Master Pages Until Orcas
This article describes how to inherit your .aspx pages from a custom class, in such a way that you can use nested master pages, without getting that terrible 'Design view does not support creating or editing nested master pages. To create or edit nested master pages, use Source view' from the Visual Studio Designer.
- filed under ASP.NET, Visual Studio - No comments / No trackbacks - § ¶
Human Computation
I came across this Google Tech Talk about Human Computation by Luis Von Ahn. Luis talks about how he uses humans to solve problems computers can't. His talk is really fascinating and funny. You should watch it!
- filed under Science - No comments / No trackbacks - § ¶
Microsoft Anti-Cross Site Scripting Library V1.5.
Microsoft's ACE Team, announced the release of the Anti-Cross Site Scripting (XSS) Library version 1.5.
- filed under ASP.NET, Security - No comments / No trackbacks - § ¶
Nine Things Developers Want More Than Money
Here's a great article about passionate software developers. It is a must-read for every software developer.
- filed under default - No comments / No trackbacks - § ¶
Optimizing C# Refactoring Performance with Web Projects in VS 2005
ScottGu has blogged about this over 9 months ago, but I had some trouble finding that blog again. So this is for my own memory: Optimizing C# Refactoring Performance with Web Projects in VS 2005.
- filed under ASP.NET - No comments / No trackbacks - § ¶
Fixing connection pooling timeout exceptions on third-party code
When a Connection object throws an exception and tells you 'all pooled connections were in use and max pool size was reached', it usually has to do with bad code. Fixing it could however be a problem if you don't own the source code. In this article a quick and dirty workaround for this connection timeout problem is proposed.
- filed under ADO.NET, C#, Databases - two comments / No trackbacks - § ¶
The DbTransactionWrapper
A few months ago I wrote some code for a project I was working on. It was a class that wrapped a SqlTransaction and a SqlConnection object. I named it the “SqlTransactionWrapper”. This class made coding easier for my colleague with whom I was working at that time. Also, I no longer needed to type a lot of code over and over again. I now rewrote the class so it fits in the more generic approach given by ADO.NET 2.0. So behold: The DbTransactionWrapper!
- filed under ADO.NET, Databases - No comments / No trackbacks - § ¶
Parallel LINQ (aka PLINQ)
Anders Hejlsberg, lead architect for the C# language at Microsoft, announced early august Microsoft is working on a parallel implementation of LINQ internally known as PLINQ.
- filed under .NET General, LINQ - No comments / No trackbacks - § ¶
Interface Bug in .NET 2.0 Runtime
There seems to be a rather nasty bug in the 2.0.50727.42 release of the .NET runtime.
- filed under .NET General - No comments / No trackbacks - § ¶
In love with BLINQ
I'm really in love with BLINQ, look at the channel 9 video here.
- filed under ASP.NET, LINQ - No comments / No trackbacks - § ¶
A Fast Dynamic Factory Using Reflection.Emit
In this post I'll show my implementation of the Factory Pattern build with C# using Generics, Delegates and Reflection.Emit.
- filed under .NET General, C# - eight comments / one trackback - § ¶
CSS Changes for IE7
The IE team blogged yesterday about their final list on bug fixes and changes for CSS, which is a must read for every web developer.
- filed under Clientside - No comments / No trackbacks - § ¶
Truly understanding the ViewState
It has already been 4 months since Dave Reed posted an amazing article about the viewstate, but it's never to late to reference it. You should read it if you haven't!
- filed under ASP.NET - No comments / No trackbacks - § ¶
.NET Backwards compatibility, why should we?
Microsofts corporate vice present of the Developer Division, Somasegar, wrote on his weblog about the backwards compatibility of the .NET framework version 2.0. But his readers doubt the usefulness of this compatibility, as do I.
- filed under .NET General - No comments / No trackbacks - § ¶
Welcome to my blog
Hi everybody, welcome to my blog!
- filed under default - two comments / No trackbacks - § ¶