Net Framework

January 12th, 2018

The problem with the .Net Standard compatibility shim…

The compatibility shim was added to .Net Standard to make it easier to reference libraries compiled using the .Net Framework. That just leaves you with the problem of missing APIs…

September 3rd, 2017

Running a .Net Core console application as a Windows Service

Although .Net Core does not directly support creating Windows Services there are several different ways of creating applications that can be registered and run as services.

July 5th, 2017

Writing unit tests for Azure Functions using C#

You can now write compiled Azure functions in C# with full unit test coverage, though there are a few obstacles along the way.

May 26th, 2017

Comparing serverless C# and .Net development using Azure Functions and AWS Lambda

Recently released toolsets for AWS Lambda and Azure Functions are finally making serverless application development available to C# developers.

March 10th, 2017

Sharing libraries between .Net Core and .Net Framework applications

Although .Net Standard does provide a mechanism for sharing assemblies between .Net Core and .Net Framework applications, as ever, you’re still very much constrained by your dependencies.

August 9th, 2016

Migrating .Net framework applications to .Net Core

Migrating existing applications to .Net Core is not a trivial undertaking so you need to be certain of the potential benefits before you start.

July 12th, 2016

Simplifying .Net REST API development: Nancy, self-hosting and ASP.Net Core

REST API development using ASP.Net WebAPI is so fussy compared to other ecosystems such as Node.js and Ruby. New frameworks are emerging that promise to simplify both development and hosting of APIs in the .Net world.

June 12th, 2015

Deploying a Windows Service remotely with Powershell

As with any deployment automation, there’s a fair amount of duct tape and chicken wire involved in deploying a Windows Service remotely.

November 3rd, 2014

Why you shouldn’t create asynchronous wrappers with Task.Run()

Many developers confuse asynchronous operations with parallel execution. The essential difference is that an asynchronous operation is concerned with which resources you consume while parallel execution is more concerned with how many.

October 15th, 2014

Parsing OData queries for decoupled data entities in ASP.NET WebApi

If you adopt OData you don’t have to expose the entire range of query functionality for every resource. You can use the OData libraries to parse queries and interrogate data directly.

June 26th, 2014

Optimising bulk inserts with Entity Framework 6

There are some techniques for improving the performance of bulk inserts in the entity framework, but the most optimal approach will always be to use a different library altogether.

May 19th, 2014

Targeting multiple .Net framework versions in a single Visual Studio solution

When you’re building components in .Net it’s inevitable that you’ll eventually have to target more than one version of the framework. Not every system is able to upgrade in step with new releases of the framework.

February 6th, 2014

Comparing Web API 2 and WCF for building services on HTTP and REST

On the face of it, Microsoft took WCF’s promise of “one implementation, any protocol” and shot it in the head with ASP.NET Web API. Now that the Web API has matured a little it is easier to see them as complimentary technologies that deliver very different types of service.

September 23rd, 2013

Memory leaks in .Net applications. Yes – they happen all the time…

The promise of garbage collection can lull .Net developers into a false sense of security. They are still vulnerable to memory leaks and have a responsibility to keep an eye on what’s going on under the hood.

June 17th, 2013

Netflix has abandoned OData – does the standard have a future without an ecosystem?

Netflix have closed their OData catalogue and EBay seem to have quietly put their implementation out to grass. With a shrinking ecosystem and no marquee services, does Microsoft’s data standard have a future?

November 24th, 2012

Regular expressions and RegEx performance in .Net

If you run into performance problems with regular expressions in .Net then your options for tuning and improving are pretty limited. Your only real hope is to keep a close eye on exactly what you’re throwing into the RegEx black box.

September 21st, 2012

Contract-first web service development using WCF and .Net 4.5

Contract first service development in .Net has always been hampered by the limited availability of any appropriate tooling. The new Contract-First tool in Visual Studio 2012 is only a partial solution.

December 12th, 2010

Exception safety in C# – more than just trying and catching

Exceptions can be a very effective means of handling errors in a systematic way, but using them properly can be a pretty delicate operation. If they are not handled properly then they can become a source of leaking resources, partially-completed operations and inconsistent data.

November 10th, 2010

ORM wars: Comparing nHibernate, LINQ To SQL & the Entity Framework

Ted Neward described ORM as the “vietnam of computer science” in that it’s a quagmire that starts well, gets more complicated as time passes and ends up as an open-ended commitment with poorly-defined goals and no clear exit strategy.

June 15th, 2010

Converting EPiServer 6 to use claims-based authentication with WIF

Converting an EPiServer site to become claims-aware is straightforward enough – the complications come when you try to use the editor and administration interfaces.

November 13th, 2008

Implicitly unreadable: the C# “var” keyword and lazy code

I am starting to increasingly see code samples that make heavy use of var and the impact of readability can be pretty extreme – it really is the kind of thing that makes a war-weary old coder like me shiver.