Just Coding RSS Feed

2018 (2)

Setting up 2 factor authentication and email verification...

Today I played with a new .net core template just to see what the authentication options were out the box and was surprised to see just how easy it is to go from nothing to having a base project that has authentication fully baked in with 2 factor au


Creating an asynchronous AuthorizeAttribute in MVC

A couple days ago I needed to call a remote web api call in my AuthorizeAttribute sometimes but as mentioned in this (Is it possible to use async/await in MVC 4 AuthorizeAttribute?) StackOverflow question (and other forums) it isn’t supported but is


2017 (5)

BenchmarkDotNet: IsBoolean method

This post might seem weird and is slightly. It's really just a pointer as with all my posts to send people to instead of sharing lots of text "on the down low" .So this all started because we have a utility lib with lots of the common string extensio


Converting Html to Pdf using C# and magic!

Everyone at some point needs to convert and html page into a PDF for some reason or another. For this I've always used a component which was cheap at the time (and is far from it now). This component has worked well for the last 8(ish) years, most is


Using ngrok to test web apps on mobile while developing

I often never really test on mobile properly because most sites are responsive so it's easier to just resize your browser and test like that. This works great until you trying to get the perfect mobile experience and looking at every element like how


Implementing a dynamic robots.txt

Firstly you might want to know why would you want to implement a dynamic robots.txt? Isn't it better to just put a static file in the web app? Yes it is but when you running your application on certain platforms like web apps in Azure when you using


Using C# 6 to make 'bad' SQL awesome

I'm busy going through Pluralsight watching Exploring C# 6 with Jon Skeet by Rob Conery. Jon Skeet goes ahead and makes this epic method that looks like it's so naughty but is pretty cool. Follow @jonskeet Follow @robconery Introduction The reason f


2014 (1)

Do you know Optional Parameters?

Up until about an hour ago I thought I knew how optional parameters worked but didn't actually. I thought (probably without giving it too much thought) that optional parameters would compile to something that would reflect having multiple overloads a