Recent Blog Posts

Microsoft .NET

WCF & IIS – System.IO.FileLoadException

System.IO.FileLoadException I recently ran into this exception using IIS to host WCF services. This exception can be a little confusing at first if you don’t know the way that IIS works. The error message is pretty simple: an assembly that our IIS application is trying to load is too long, exceeding either the 248 character [...]

Continue Reading →

Using JQuery Timer to Update MVC View

Sometimes it’s useful to refresh a page (or a portion of a page) on an interval. One of my favorite ways to accomplish this is by doing a partial page refresh using JQuery. Getting this working is pretty simple, you only on need a small snippet of JavaScript. The simplest way is to use the [...]

Continue Reading →

SQL Statement Management Strategies

When you use SQL statements within your application, most of the time you need to come up with some way of managing them. There are many ways to do this of course, this post discusses a few of the more common approaches.

Continue Reading →

NuGet – Library Management for Your Organization

What is NuGet? NuGet (pronounced “New-Get”) is an open source package management system for the .NET platform. NuGet can be used to simplify the process of incorporating libraries into your project during development. NuGet is also a member of the ASP.NET Gallery in the Outercurve Foundation (see the press release).

Continue Reading →


Removing Duplicates with LINQ

If you need to remove duplicates from an IEnumerable (array, List<T>, etc.), you can use the Distinct LINQ extension method from the Enumerable class in the System.Linq namespace to make the job extremely easy.

Continue Reading →

ADO .NET Connection Cleanup

A common mistake developers make when working with ADO .NET is to not cleanup after themselves. When you open a connection to a database, you need to close and dispose of it properly when you are finished with it, or you will be left with a condition know as connection leaking.

Continue Reading →

Measure Code Execution Time

A common method used to measure the amount of time a peice of code takes to execute is to take multiple time snapshots using DateTime.Now, and then comparing those snapshots. While this certainly works, it’s not the most accurate way to measure. A better way is to use the Stopwatch class in the System.Diagnostics namespace.

Continue Reading →

Enumerating Enum Values

The following example shows how to enumerate through the values of an enum using the Enum.GetValues static method.

Continue Reading →