23 June 2020
As part of a process of limiting my exposure to Google products, I am migrating my photo storage from Google Photos.
27 February 2020
A quick tip on how to sort null values at the end of a list when using the LINQ OrderBy operator
25 February 2020
20 February 2020
Demonstrates how you can schedule the publishing of content when using Gatsby and Netlify
18 February 2020
I demonstrate how you can use EF Core Global Query Filters to filter data belonging to the current user.
12 February 2020
A technique to easily filter out database records belonging to the current user.
10 December 2019
Here are a few ClaimsPrincipal extension methods I use in my project to retrieve user information from the claims
4 December 2019
ASP.NET Razor Pages uses anti-forgery tokens to protect websites against Cross-site request forgery (CSRF) attacks. When posting information to Razor Pages, you need to take special care to send this anti-forgery token otherwise the request will be rejected
2 December 2019
Check the reputation of a user's email address when registering for your application to try and prevent spammers from registering
29 November 2019
It often happens to me during development that I want to inspect a user's claims. Here is a quick helper method I implement in my projects that displays the user's claims
12 July 2019
I continue the migration of my website from Hugo to Gatsby. In this blog post, I look at removing the styling that is included in the blog starter kit and add the Tailwind CSS library to my website.
9 July 2019
I continue the migration of my website from Hugo to Gatsby. In this blog post, I look at moving the markdown files with the blog posts as well as the images into the Gatsby website.
8 July 2019
In this blog post, I continue migrating my personal website to Gatsby. Specifically, I am looking at how to sort out the folder structure for my blog posts.
4 July 2019
One of the first steps in moving my personal website over to Gatsby is to bring across the blog content. In this blog post I expore Gatsby's blog starter kit and look at my options for bringing my blog content across.
1 July 2019
I have decided to migrate my personal website from Hugo to Gatsby and write a series of blog posts on the process. In this first blog post, I'll discuss the reasons for the change as well as my decision to go with Gatsby.
28 June 2019
Fallback policies in Polly allow you to provide a substitute value in the event of a failure. This is useful in situations you don't want failure to throw an exception, but instead return a default value.
26 June 2019
Conveyor is an extension for Visual Studio that allows you to access your local IIS Express app from the public web. This can be useful in situations where you want to test webhooks, for example.
25 June 2019
ngrok is tunnelling software that allows you to expose your local web server to the outside world. This is ideal for scenarios like testing webhooks.
10 June 2019
SignalR 3.0 adds the ability to automatically attempt to reconnect clients with the connection to the server is dropped
6 June 2019
This guide will show you how you can create a backup of a SQL Azure Database and restore it to a LocalDB database
12 April 2019
Demonstrates how to determine the available .NET Core and Node runtimes on Azure App Service
18 March 2019
Describes an issue I ran into where ASP.NET Core apparently was not binding to my model correctly which turned out to be a case of ModelState interfering.
20 November 2018
Demonstrates how to secure routes in Vue with navigation guards when authentication users with Auth0 and oidc-client.js
14 November 2018
26 October 2018
Demonstrates how you can create clocks for multiple time zones in Windows 10 so you can easily keep track of the current time in another part of the world.
22 October 2018
The "Clean Solution" command in Visual Studio does not clear all the build artifacts. Here's how you can use the Git clean command to remove all unwanted build artifacts
12 September 2018
Dependabot is a service that will automatically create pull requests to update outdated dependencies in your .NET projects.
11 September 2018
This follow-up from my previous blog post on the topic demonstrates how to refresh an entire section of a page when deleting a record with AJAX.
4 September 2018
After working remotely for many years, I share some of my thoughts on it and why I am heading back to the office.
14 August 2018
You can delete records and update the user interface using Ajax, which gives a much better user experience that refreshing the entire page.
8 August 2018
Introduction post to a series of blog posts that demonstrate how you can use the jQuery Unobtrusive Ajax library to achieve interactivity on normal, server-rendered ASP.NET Core applications
24 July 2018
Google access tokens are short-lived, but you can configure a Polly policy to refresh the access token when expired.
21 July 2018
Demonstrates how you can store the contents of a Dictionary property as a JSON document in your database when using EF Core 2.1
13 July 2018
Tips and tricks to help you get the most out of GitHub Desktop
29 June 2018
Changing your application's favicon is a convenient way to communicate the current state of the application to the user.
28 June 2018
Demonstrates how you can use Coravel to schedule background jobs and then report on the status of a job with SignalR
27 June 2018
The JsonConverter class allows you to deserialize differently structured JSON objects to the same C# class.
26 June 2018
Demonstrate how to use the .NET Core CLI to find transitive dependencies for any .NET Core project.
20 June 2018
Demonstrate how to use the .NET Core CLI to analyze dependencies for any .NET Core project.
19 June 2018
Look at how you can ensure that services are disposed of when using dependency injection with .NET Core Console applications.
31 May 2018
I dedicated May to finishing and shipping all of the half-baked ideas that have been brewing for the past years. This is how it went.
25 May 2018
When adding package references in your projects files, you are not limited to specifying a specific version. You can specify a version range instead.
11 May 2018
Demonstrates how you can customise the rendering of the result hits when using the Hits widget in Algolia InstantSearch
17 April 2018
The .NET Console is limited to 16 colors. Learn how you can convert a hexadecimal color code to one of the 16 colors available in the console.
11 April 2018
Determine whether the current working directory is part of a Git repository, and if so, retrieve information for the remote GitHub repository.
5 April 2018
Demonstrates how to use ANSI colour codes in .NET Core console applications, as well as the limitations of this on Windows.
2 April 2018
Polly is a fault-handling library which allows you to-among other things-implement a retry policy in your applications. This is ideal in situations where you have flaky network connections with intermittent connectivity issues.
27 March 2018
A quick tip to demonstrate how you can pass arguments to your application using the .NET CLI
22 March 2018
Blazor is an experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly. Let's see how you can start experimenting with this today.
22 March 2018
By default, DocFX generated websites contain the .html file extension in the URL. You can use Netlify's asset optimization features to clean these URLs up.
5 March 2018
Shows how you can validate RS256 signed tokens in the OWIN JWT middleware using an offline certificate.
1 March 2018
Expanding the OpenIddict authorization server to allow users to sign in with their GitHub accoouts.
26 February 2018
A basic introduction to creating an OpenIddict authorization server for OpenID Connect clients.
25 January 2018
A walthrough of my ShareX configuration for creating screenshots for blog posts and other forms of documentation.
23 January 2018
AWS Lambda is an ideal use case for developing GitHub Webhooks. Here's looking at how you can implement one using ASP.NET Core.
4 January 2018
An introduction to the generic OAuth 2.0 authentication handler in ASP.NET Core 2.0 which allow you to authenticate users using any OAuth 2.0 provider.
20 December 2017
A look at using the Tailwind CSS framework in Angular applications, allowing you to rapidly build custom user interfaces.
13 December 2017
A look at using the Tailwind CSS framework in Vue applications, allowing you to rapidly build custom user interfaces.
12 December 2017
MariaDB is an open source database compatible with MySQL. Here's looking at how you can use this in your ASP.NET Core application.
11 December 2017
6 December 2017
You can use the netlify.toml file in your repository to override Netlify build settings, allowing you to generate future posts for certain branches.
5 December 2017
I have switched my blog over to Hugo hosted on Netlify. Here are some great Netlify features I think you will like.
4 December 2017
20 November 2017
A great tip I picked up from an NDC Oslo presentation which shows how you can dynamically create authorization policies for the ASP.NET Core authorization middleware.
14 November 2017
Shows how to generate an access token to call the GitHub API when creating a Webhook for a GitHub application.
23 October 2017
A look at a couple of approaches you can use to schedule future posts using Netlify and Hugo.
19 October 2017
Time to leave my job at Auth0 and explore some new opportunities.
15 October 2017
I upgraded to a new 5th Generation Lenovo X1 Carbon. Here are some of my initial thoughts.
12 September 2017
Demonstrates how you can configure the Google authentication handler to only allow users from a certain domain to sign in to your application.
10 September 2017
Razor Pages allow you to define extra handlers over and above the normal OnGet and OnPost handlers. This can be useful for handling AJAX requests.
7 September 2017
A useful tip for exluding files from just your own local Git repository by using the .git/info/exclude file
5 September 2017
The .NET Core CLI allow you to supply custom templates for creating new projects. Here's looking at some resources for developing your own templates
6 August 2017
VS Code is a great tool for developing ASP.NET Core applications. Here's looking at some resources which you will find useful.
1 August 2017
The ASP.NET Core OIDC middleware allow you to save the ID Token and Access Token, so you can access these in your application.
30 May 2017
Overriding the NameClaimType when in the ASP.NET Core OpenID Connect middleware allow you to specify a different claim from the ID Token to use as the name of the subject.
26 May 2017
When using the ASP.NET Core JWT authentication handler, there are instances in which you may want to access the actual bearer token which was passed to the request.
18 May 2017
You can determine a user's location from their IP Address. It is not as accurate as the HTML 5 Geolocation API, but their are many instances where this is acceptable.
7 May 2017
Creating a simple serverless application using ASP.NET Core, AWS Lambda and AWS API Gateway
11 April 2017
A look at creating a simple serverless application using .NET Core, AWS Lambda and AWS API Gateway
10 April 2017
Shows how you can manually validate a JSON Web Token using .NET
10 April 2017
Demonstrates how you can prevent an item in a UWP ListView to be reordered.
23 March 2017
Get started with C# and .NET Core by creating a Lambda function which compresses images uploaded to S3 using TinyPNG.
22 March 2017
A look at some resources to get you started with developing .NET Core applications hosted on AWS Lambda
18 February 2017
The TinyPNG CLI is a command-line tool that allows you to shrink images using the TinyPNG API.
16 February 2017
A look as some of the resources I find useful for learning Vue.js
10 February 2017
Looking at the peculiar culture of business card exchange in Japan
31 January 2017
Shows how you can alter the response sent from your Web API in response to validation errors
5 December 2016
Demonstrates how you can manage the lifetime of the authentication cookie when using the ASP.NET Core OAuth 2.0 authentication providers
24 November 2016
Demonstrates how to run a single unit test, or sets of unit tests, when using the NUnit 3 test runner for .NET Core.
24 November 2016
Demonstrates how you can use the .NET Core Configuration system in .NET Core unit test projects
12 July 2016
The JSON Web Token middleware in ASP.NET Core knows how to interpret roles inside your JWT.
7 July 2016
I show how you can add extra parameters to the Authorization URL when using the ASP.NET Core OpenID Connect middleware.
31 May 2016
I look at a couple of options you can use when you want to access the Request object inside your Tag Helper.
30 May 2016
I talk about the new configuration model in ASP.NET Core and how it can protect you from accidentaly checking secrets into source control.
6 March 2016
Custom converters in JSON.NET allow you to write custom logic when serializing or deserializing JSON. In this post I look at an example where the JSON returned could be either an object or an array.
7 February 2016
The JSON.NET JsonExtensionData attribute allows you to serialize elements of a JSON document which does not have matching properties to a collection.
24 January 2016
Ran into a "Permission Denied" problem recently on Linux with executing a script from Jenkins, and this is how it was resolved.
5 January 2016
Part 5 in a series of 5 blog posts which recaps the Tools and Libraries I covered during 2015 in ASP.NET Weekly
1 January 2016
Listing the top 10 blog posts on my blog for 2015
29 December 2015
Part 5 in a series of 5 blog posts which recaps the Tools and Libraries I covered during 2015 in ASP.NET Weekly
22 December 2015
Part 3 in a series of 5 blog posts which recaps the Tools and Libraries I covered during 2015 in ASP.NET Weekly
15 December 2015
Part 2 in a series of 5 blog posts which recaps the Tools and Libraries I covered during 2015 in ASP.NET Weekly
8 December 2015
Part 1 in a series of 5 blog posts which recaps the Tools and Libraries I covered during 2015 in ASP.NET Weekly
1 December 2015
I will take a break from blogging new content for December and perhaps a part of January as well, and will feature some of the content from ASP.NET Weekly.
24 November 2015
I look at how you can use the new In-Memory database support in Entity Framwork 7 to unit test your controllers.
17 November 2015
I discuss a few of the techniques you can use to find work as a freelance developer or contractor.
10 November 2015
I demonstrate how you can allow users to save even more fine grained culture settings preferences against their profile.
3 November 2015
I demonstrate how you can allow users to save their culture settings preferences against their profile.
27 October 2015
A look at how you can keep your Entity Framework models in a separate project from your main ASP.NET 5 project.
20 October 2015
I describe the steps the ASP.NET 5 Localization middleware takes to determine the correct culture settings for a specific request.
13 October 2015
One of the new things I had to figure out in doing unit testing in ASP.NET 5 was how to mock the necessary infrastructure to test my controllers. In this blog post I show a few techniques you can use.
6 October 2015
A quick note on setting the Culture in your ASP.NET 5 application to a specific setting.
29 September 2015
The new select TagHelper allows you to bind to an enumerated type, and I show you how you can display a list of possible values in the Select list.
22 September 2015
I demonstrate how you can create your own very lightweight API wrapper when you don't want to use a large external library to access with external APIs, or when no official wrappers exists for an API.
15 September 2015
Demonstrates the support of the new Select TagHelper in MVC for option groups (OptGroup)
8 September 2015
A call for contributors to help with the new OAuth providers for ASP.NET 5
1 September 2015
Shows a simple technique you can use to allow users to quickly add records by selecting a checkbox that indicates that they want to add another record after saving.
25 August 2015
Shows how you can use Autofac to resolved WebJob instances and inject dependencies into your web jobs
18 August 2015
I demonstrate how you can use Autofac to resolve dependencies differently based on whether the user is authenticated or not.
11 August 2015
I extend the example from the previous blog post to demonstrate how you can unit test by mocking DbSet instead of using a fake DbSet.
4 August 2015
I show how I unit test queries against my DbContext using a Fake DBSet and NBuilder.
3 August 2015
I am moving my blog to Jekyll soon. Please update RSS feeds
28 July 2015
Demonstrates how you can generate URLs in your application which are not only more friendly to search engines, but for users as well.
21 July 2015
NSubstitute is a mocking framework for .NET. One of the reasons I like NSubstitute is because you can generate the output for a mocked function call, based on the input parameters passed to the function.
14 July 2015
Demonstrates how you can use SignalR to communicate the progress of background tasks from a Azure WebJob to your ASP.NET website.
7 July 2015
Shows how you can easily create test data with NBuilder and Faker as part of your Seed data generation process for Entity Framework.
30 June 2015
Shows how you can authenticate a user with an OAuth provider using a popup dialog. Also uses SignalR for callbacks to automatically refresh the page after authentication.
14 June 2015
Some of my observations from living in Southeast Asia for the past two and a half years (most of it in Thailand)
19 May 2015
Shows how you can extract an interface from your DbContext and then resolve the interface with the ASP.NET 5 dependency injection framework
12 May 2015
Discussing 2 different approaches you can use when rendering a list of items in a row and column layout using the Bootstrap grid system.
27 April 2015
The ASP.NET OAuth providers do not have to be used in conjunction with ASP.NET Identity. I show you how you can use them on their own.
21 April 2015
I cover a couple of more advanced configuration scenarios in the ASP.NET 5 generic OAuth authentication provider, such as Scopes and retrieving user information.
14 April 2015
An introduction to the new generic OAuth authentication provider which is part of ASP.NET 5
7 April 2015
Testing business logic which depends on the current date for calculation can be a bit tricky. I show you how you can mock the current date so you can write better unit tests for this code.
24 March 2015
A few resources for ASP.NET developers to help you with learning and getting more value from Twitter Bootstrap.
20 March 2015
When using the word ASP.NET in Twitter, Twitter will use 22 characters instead of 7. This blog post shows you how to fool Twitter.
4 March 2015
Looking at how we can page over real-time data by using the ID of the record
25 February 2015
Looking at how we can allow users of our API to page through result sets by giving them pagination links to follow when requesting.
18 February 2015
Looking at how we can implement paging in ASP.NET Web API by sending paging meta data in HTTP Headers. Also looks how you can request specific pages through headers.
11 February 2015
Looking at how we can implement paging in ASP.NET Web API by wrapping the result set in a simple JSON envelope containing the data as well as paging meta data.
20 January 2015
An introductory post on my new series on how to do paging in ASP.NET Web API. This will look at the various techniques used by some of the most popular APIs
8 December 2014
A list of all my favourite Nuget packages which I seem to use over and over again
2 December 2014
Demonstrates how to use Autofac and the Common Service Locator to resolve dependencies in Azure WebJobs
18 November 2014
Demonstrates how to create a Dropbox webhook in ASP.NET and ensure that requests to the webhook originates from Dropbox
3 November 2014
Demonstrates how to build a grid with sorting and paging using ASP.NET Web API, AngularJS, Restangular and ng-Table. This is Part 5 which adds searching.
28 October 2014
Demonstrates how to build a grid with sorting and paging using ASP.NET Web API, AngularJS, Restangular and ng-Table. This is Part 4 which adds sorting.
21 October 2014
Demonstrates how to build a grid with sorting and paging using ASP.NET Web API, AngularJS, Restangular and ng-Table. This is Part 3 which adds paging and ngTable.
14 October 2014
Demonstrates how to build a grid with sorting and paging using ASP.NET Web API, AngularJS, Restangular and ng-Table. This is Part 2 which adds a very basic grid.
7 October 2014
Demonstrates how to build a grid with sorting and paging using ASP.NET Web API, AngularJS, Restangular and ng-Table. This is Part 1 which covers the basic setup.
22 September 2014
Chronicles my experiece in moving my blog from Hexo on Azure to Statamic running on Linux.
28 July 2014
How to determine which Visual Studio command is assigned to a specific keyboard shortcut.
23 July 2014
The ASP.NET MVC (or Web API) and AngularJS parts of your apps share the same translations. This shows how you can share those using a single source for translations.
13 July 2014
Extending your use of the FluentValidation library by integrating it with the remote validation in jQuery Validation.
27 March 2014
Sometimes you may find that the Resharper Code Cleanup option is not available. This discusses the likely cause and how to work around it.
25 March 2014
Extends the 2 factor autentication in ASP.NET Identity 2 to also add support for the Google Authenticator application.
24 February 2014
Shows how you can send the emails for the 2 factor authentication in your ASP.NET MVC application via Twilio.
18 February 2014
ASP.NET Identity 2.0 adds support for adding 2 factor authentication to your application. This walks you throught the process of setting it up.
27 November 2013
Introduces you to the GitHub OAuth provider for ASP.NET MVC (using OWIN) and shows you how to use it in your own projects.
26 November 2013
Introduces you to the Yahoo and LinkedIn OAuth providers for ASP.NET MVC (using OWIN) and shows you how to use them in your own application.
11 November 2013
ASP.NET MVC 5 does not include an OAuth login provider for Google+ out of the box. This post shows how you can create your own.
5 November 2013
Demonstrates how you can disable selection of Windows 8.1 GridView items dynamically by using a DataTemplateSelector
31 October 2013
Demonstrates how you can use Value Converters, Data Template Selectors and the Visual State Manager to make your Windows 8.1 GridView data templates more dynamic.
28 October 2013
You have authenticated a user in your ASP.NET application using their Twitter profile, but how do you store the Twitter OAuth token to make subsequent API calls? This shows you how.
21 October 2013
Discusses 3 different options you can use to add modern icons to your Windows 8.1 XAML application.
18 October 2013
Demonstrates how to customize the login buttons in ASP.NET MVC 5 with the look and feel of the various Social Media Networks
15 October 2013
Sometimes it is necessarry to mock an abstract class. I demonstrate how you can achieve this using NSubstitute as your mocking framework.
12 August 2013
When there are no official APIs to integrate with an external system you can always fall back on the time tested method of screen scraping. We take a look at how you can do this.
8 August 2013
Even if you cannot contribute source code to an open source project, there are various other ways in which you can help out. We take a loot at a few of those.
5 August 2013
Demonstrates how you can download Open Graph data from a web page using the AngleSharp library.
22 July 2013
A brief introduction to the Open Graph protocol which you can use to add context to your HTML pages which is understood by Facebook and others.
8 July 2013
My first attempt at submitting an app to the Windows 8 app store went less than spectacular. Here are a few things which you need to look out for.
3 July 2013
When you are a developer who registered an application in Facebook, deleting your Facebook account will also delete you application. This shows you how to transfer your Facebook application to a new "developer only" Facebook account
19 June 2013
Configure the RSS Subscription extension in Google Chrome to quickly add any RSS feed to your Feedly subscriptions.
12 June 2013
Part 4 of 4 of my introduction to using FluentValidation in ASP.NET MVC. This post covers how to validation against your database.
26 May 2013
Part 3 of 4 of my introduction to using FluentValidation in ASP.NET MVC. This post covers how to inject dependencies into your validation classes.
13 May 2013
Part 2 of 4 of my introduction to using FluentValidation in ASP.NET MVC. This post covers how to unit test your validation classes.
6 May 2013
Part 1 of 4 of my introduction to using FluentValidation in ASP.NET MVC. This post covers the basics of setting up FluentValidation.
19 April 2013
My take on how I use Test Driven Development to stay on track and keep moving forward with my work, even when I am offline.
20 March 2013
Demonstrates how you can subscribe to the collection change notifications in ReactiveUI to keep to sepate collections in sync.
10 March 2013
Demonstrates how to create a Google+ sign in button for your ASP.NET MVC 4 website.
25 February 2013
Demonstrates how to configure the ViewLocator and ViewModelLocator in Caliburn Micro when you split your Views and View Models across different assemblied.
21 February 2013
When setting the DataContext property of a XAML page in a Windows 8 Store app, Caliburn Micro does not set the DataContext to the correct View Model.
18 February 2013
Demonstrates how you can pass custom parameters to Caliburn Micro actions by using the SpecialValues collection of the MessageBinder class.
9 February 2013
Demonstrates how to customize the login buttons in ASP.NET MVC 4 with the look and feel of the various Social Media Networks.