We have an API that handles ~45k monthly requests that was, at times, responding strangely. I suspected it was related to the .NET Core service lifetimes. The symptoms in question were that out of the blue, the API response body had a status code of 409 with a message of invalid user-provided values, however, the […]
.NET Global Exception Handler to Return Problem Details For Your APIs
This article will focus on handling custom exceptions for flow control on .NET with a global exception handler and return a problem details object. Having said that. There are, for the most part, two schools of thought. One where it is OK to throw a (custom) exception to control flow. i.e. Throw a UserNotFoundException when […]
Configure CORS in .NET
We need to configure CORS in .NET (or really in any other language) when an application’s front-end and back-end are being served from different domains, aka origins. And more than likely, during development, both the front-end and back-end will be running from different ports on localhost.
.NET Core Options Pattern For Live Reload Settings
There are many great posts about implementing the Options Pattern .NET Core with IOptionsMonitor on the interwebs, but many fail to point out one “gotcha” when working with IOtionsMonitor to live reload settings.
Add a React App to a NET Core MVC App
In this tutorial, we will go step by step on how to add a React App to a NET Core MVC App. Handling 404 pages and client routing. I am one to think that not everything I build has to be a Single Page Application (SPA). Recently I was building a project for a client, […]
Getting Started with Vue.js in .NET Core using Visual Studio
You have heard a lot about Vue.js and how awesome it is, and now you want to use it with your next .NET Core app. Well, it is far easier than you might think. In this tutorial, besides getting started with Vue.js, we will cover the following: SASS compilation ES6+ JavaScript transpilation to ES5 with […]