DevTrends Blog

The DevTrends technical blog covers .NET, Microsoft Azure, IoC, ASP.NET MVC, Web API, AspNet Core, Open Source releases plus anything else that I find interesting :-)

Displaying page 1 of 4

asp.net core

Custom response caching in ASP.NET Core (with cache invalidation)

This post looks at custom output caching and in particular, allowing cache invalidation (cache busting) at the server level to allow the use of response caching for more dynamic pages. More »

asp.net core

A guide to caching in ASP.NET Core

This post looks at the various techniques available in ASP.NET Core for caching. We'll look at caching of data, partial pages and full pages at the server and client level and explain when to use each More »

asp.net core

Hashing, Encryption and Random in ASP.NET Core

This post look at hashing, encryption and random string generation in ASP.NET Core. We examine a few different approaches and explain why some common techniques should be avoided in modern applications. More »

.net core

Create a Free Private NuGet Server with Continuous Deployment using VSTS

In the last post we looked into shared libraries in .NET Core and concluded that using NuGet packages is the preferred solution for distribution to multiple applications. This post shows how to use Visual Studio Team Services (VSTS) to set up a continuous deployment pipeline for your internal libraries to publish them to a private secure NuGet server. More »

.net core

Creating your first shared library in .NET Core

Sharing libraries between projects is a fundamental requirement in all but the most simple applications. This post looks at how things have changed with .NET Core. We look at the different types of class library available, how to create a simple library and the best way to reference shared libraries from other applications. More »

asp.net core

Conditional Middleware based on request in ASP.NET Core

This post looks at how to configure ASP.NET Core middleware in a way that allows you to have different middleware for different types of request. There are many use-cases for this but one common example for this requirement is a project with both MVC and API actions where you want to error handling to be different for each. More »

asp.net core

Handling errors in ASP.NET Core Web API

This post looks at the best ways to handle exceptions, validation and other invalid requests such as 404s in ASP.NET Core Web API projects and how these approaches differ from MVC error handling. More »

asp.net core

Handling 404 Not Found in Asp.Net Core

You might be surprised to find that the default asp.net core mvc templates do not handle 404 errors gracefully resulting in the standard browser error screen when a page is not found. This posts looks at the various methods for handling 404 not found errors in asp.net core. More »

mvc

Using Unity.MVC5 and Unity.WebAPI in Umbraco

If you have ever tried to configure an Umbraco application to use Unity.WebAPI and Unity.MVC5 then you may well have experienced the error 'An error occurred when trying to create a controller of type LegacyTreeController'. This post explains the reason for the error and reveals the single line of code that is necessary to fix it. More »

web api

Wrapping ASP.NET Web API Responses for consistency and to provide additional information

Most well known public facing API's return a consistent response with a similar structure returned for all requests regardless of success or failure. This makes consumption of the API far easier and more intuitive. It also allows custom meta data to be added to every response. Out of the box, ASP.NET Web API does not use a common structure but it is very easy to change. This post explains how you can shape your responses by utilising a simple DelegatingHandler. More »

View Older Posts