Avoid null with Containers

In C# It's often recommended that you should avoidi using nulls wherever possible. Avoiding nulls is a great concept that can simplify your code. Even so, nulls (or some such equivalent concept) will always have their place, such as to convey data is not available. However, one…

Example Web.Config files (3.5 and 4.5)

These are the default generated Web.Config files from Visual Studio 2013 Update 3. Web.Config for .NET Framework 4.5.1 Web.Config for .NET Framework 3.5 Other variations are all quite similar but if you think I'm missing one that's useful leave a comment. Web.Config for .NET…

Unlocking locked files in Windows

Every developer has run into this issue at least once. There are a few different tools you can use to find out what process is locking a file. In the past I've used a few different tools. My favorite tool today is Lock Hunter which is powerful and easy to use. It's packed with a…

Debugging Rx with Seq

Debugging Reactive Extensions can sometimes be a bit tricky. When you have a few stream to watch, pinpointing failures is time consuming, and a can easily become a burden. Catching first-chance exceptions can be extremely helpful when debugging Rx. However, it's much more useful…

Making great Octopus PowerShell step templates

Step templates, introduced in Octopus Deploy 2.4, are a great way to share and reuse useful PowerShell scripts. Anyone can make a step template and submit it via a pull request over at Github. I've come up with a few tricks to make writing step templates easier. I wanted to make…

Powershell typeof

Coming from C#, it provides the built in function that you can use to get the of a class. Powershell also makes it easy to get Type information. Wrapping the type in square brackets evaluates to an instance of . Which you can then use to compare it as per normal. You can also…

Octopus Deploy

I'm happy to announce that I've joined forces with the amazing developers at Octopus Deploy. It's a fantastic product and if you havn't heard of them yet make sure you take a look. Deployments are such an important part of every project, yet they're often overlooked until the…

An update on background tasks in ASP.NET

There are two types of background tasks that you'd want to use in .NET. Long running tasks which include things like background services that run every 5, 10 minutes or another interval. Long running tasks could be continuously running, possibly spanning several days. Then there…

Implementing Domain Driven Design

I've talked about what Domain Driven Design is and what kind of benefits you can expect from it. The next concept to explore is what the implementation looks like. I'll be focusing on the architecture of such a system more than how to model a domain, which Eric Evans covers in…

Internet Explorer Won't Save Cookies On Domains With Underscores In Them.

All versions of Internet Explorer (version 5.5 all the way to version 11) will discard all cookies if the domain has an underscore in it. This can lead to the following issues, which can be quite difficult to debug: Cookies are not set on the client system. ASP.NET Session…