Blog

InSQL
When working with a SQL Server database, I often find it helpful to have a SQL query to hand that can be executed to tell me how many rows exist within each database table. This can be useful in scenarios where records are being inserted into lots of tables and you need to check that…

Local AppData is a directory within the Windows operating system where software applications can store data that is specific to the current user. Getting the location of the Local AppData directory for the current user within a .NET application is straightforward. However, currently, there isn’t a .NET API that allows you to get the Local…

InWeb
Providing users of a web application with a way of copying data to the system clipboard is a common requirement that can be achieved by employing some client-side JavaScript. This functionality is often needed so that users can copy some form of text, for example, a quotation or a block of code, without needing to…

InSecurity
Many options are available when it comes to encrypting sensitive data via a .NET application. However, while the System.Security.Cryptography namespace provides a plethora of different encryption algorithms, many of these are obsolete and should be avoided if possible. It is therefore important to keep abreast of the latest recommendations, especially when it comes to security-critical…

When types from another assembly cannot be referenced statically at compile-time in a .NET application, subscribing to events defined in that assembly and subsequently accessing event arguments that are passed to event handlers can seem a little tricky. Thankfully, with the combination of the Reflection API and the dynamic operator, it is possible to subscribe…

It isn’t usually possible to launch a GUI (Graphical User Interface) application from a Windows Service. There are good reasons for this; aside from the security considerations, being interrupted while doing something important by a badly behaving background application would not be fun! However, there are some limited use cases for starting processes that feature…

IdentityModel is an open-source library developed by Dominick Baier and Brock Allen which does an excellent job of simplifying interactions with OAuth 2.0 and OpenID Connect servers. However, when it comes to unit testing, it can appear on the surface to be somewhat difficult to create certain objects that need to be instantiated on demand…

Every process on a Windows device features a ‘command line’ that may include one or more arguments or ‘switches’ that can affect the behaviour of the running program. While it is possible in a .NET application to specify the arguments to use before starting a new process, currently there isn’t an API that allows the…

InTools
Recently I came across a tool for Windows that has helped to improve my productivity as a software developer. The tool is called DevToys and it is a very slick and polished, yet simple and streamlined app that is packed full of features. If you constantly find yourself searching for online encoders and hash generators,…