Blog Post Code Licensing
I hadn’t really thought about this before as I’d just assumed that any code that I posted would be freely available for anyone else to use as they saw fit but it turns out that I actually implicitly retain the Read more…
I hadn’t really thought about this before as I’d just assumed that any code that I posted would be freely available for anyone else to use as they saw fit but it turns out that I actually implicitly retain the Read more…
If for whatever reason you can’t just use a nice jQuery plugin like js-cookie then the below Javascript will serve as a basic method of setting and getting cookies.
I use Serilog for logging in most of my console applications as specified here, however the AddConsole and AddDebug extension methods are now obsolete in .NET Core 2.2 giving the below errors. ‘ConsoleLoggerExtensions.AddConsole(ILoggerFactory)’ is obsolete: ‘This method is obsolete and Read more…
Azure Key Vault is a pretty handy way of centrally managing access to secrets and logging what process has requested access to them. The best way to use it is for Azure hosted resources such as Web Applications or VMs Read more…
This is an evolution of my previous post in which I described a method for inspecting the body of a request in a middleware method and passing it out so it could be logged later if required. The below code Read more…
Below are a couple of methods for making working with DateTime objects easier that I thought I’d collate into a single post. Default Value When using a newly initialised DateTime object as a source for an input field in an Read more…
One of the options in bootstrap-datepicker is to show the week number on the same row as the days of the week. This numbers the weeks using the ISO-8061 standard which is fine (though it would be nice to have Read more…
If you want to send some URL encoded content to an API you can use the built in FormUrlEncodedContent to convert an IEnumerable<KeyValuePair<string, string>> to a correctly coded content object. The most basic way to get the required KeyValuePair IEnumerable Read more…
IdentityServer4 is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core 2 which can be used to manage authentication for web applications. In my case I wanted to set up OAuth 2.0 authentication using a SQL backend for an Read more…
Although there’s plenty of documentation by Microsoft on how to use their Bing Ads API the documentation on how to initially connect to it seems a bit fragmented so this is an attempt to summarize all the steps required to Read more…