Programming

ASP.NET 5 Middleware

The ability to create your own middleware comes in pretty handy when creating MVC 6 APIs as it allows the inspection and processing of the requests/responses flowing into and out of the application. A few of the most useful ones I’ve used are below, a good guide to using middleware Read more…

By Shinigami, ago
Programming

Tag helpers in ASP.NET

Tag helpers in ASP.NET Tag helpers are a new feature in MVC 6 and are similar to the old style HTML helper methods though they have a more HTML like syntax. There’s plenty of good guides about how to use them around so I’m not going to rehash that here, Read more…

By Shinigami, ago
Programming

Live Chart.js Charts

I wanted to use Chart.js charts in my ASP.NET Core projects and as there didn’t seem to be anything existing that fit the bill decided to do it myself. Chart Creation There seems to be a few projects around for generating the relevant javascript for Chart.js but all the ones Read more…

By Shinigami, ago
Programming

Enabling HTTPS Rewrites

When setting up a website, even if it’s just a generic blog like this one, it’s good to encrypt traffic to and from it using SSL. Obtaining certificates If you’re hosting a site on it’s own custom domain name rather than using a free hosting provider then you’ll likely need Read more…

By Shinigami, ago
Programming

ASP.NET Core Connection Strings Class

There’s various different ways to access values from appsettings.json in ASP.NET Core, one way to do this is create a corresponding settings class and map the values to it. First off, add a connection stings section to your appsettings.json file like so (where {ConnectionString} obviously equals your connection string). "ConnectionStrings": Read more…

By Shinigami, ago
Programming

API .Net Core XML Ingestion

API .Net Core XML Ingestion What I need to do here is to create an API that can authenticate and ingest an XML POST request, saving the provided data into a SQL database and returning a relevant HTML status code. Unfortunately this wasn’t quite as easy as I’d anticipated as Read more…

By Shinigami, ago