Encrypting cookies with ASP.NET

I hadn’t noticed it before, but ASP.NET provides a really simple way to encrypt your cookies. Cryptography is a field best left to the experts, but for simple encryption purposes this method is perfectly adequate. [Read More]
Tags: asp.net

SQL Server Query Plans

The caching of query plans in SQL Server is extremely important when it comes to application performance. The way this works is not very well understood - I still don’t get all the intricacies of it but as a general rule of thumb, it’s a good move to either: [Read More]
Tags: sqlserver

Custom Dictionary Sections in .NET Config Files

When you need to add complex configuration structures to .NET config files, you will generally create your own custom configuration section classes, and implement them within your application. However, if you just need a standard key/value pair, you don’t need a custom configuration type at all. Instead, you can just... [Read More]
Tags: c#

FxCop - Excluding rules in code

One of the tools we use at my current job to validate code as part of our automated build is FxCop. It can be a pain, but we’ve found it very useful in terms of standardising our code and rooting out all those un-used variables that seem to grow to... [Read More]
Tags: fxcop

Google syntax highlighter

In setting up this blog, I was weighing up my options as to how to highlight code. You can do it manually by setting the colour of individual words, but that is just a pain in the ass, particularly for larger posts so I considered writing a JavaScript class for... [Read More]