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…
Blog
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,…
Windows Services offer a robust mechanism for hosting long-running background applications on Windows devices. These services are usually configured to start with the operating system and can be stopped and started on demand. They are ideal for processing background tasks as they do not show a user interface and therefore do not interfere with what…
In my previous post, I introduced Azure Functions and walked through the process of creating and debugging your first C# function using Visual Studio. This time, I’m covering the topic of deployment and how functions can be published to Azure. After reading this article, you’ll understand how to publish an Azure Function to Azure using…
Azure Functions is an Azure cloud service that allows software developers to focus on writing code that reacts to events, without needing to concern themselves as much with the infrastructure that the code is running on. Azure Functions applications are serverless by nature and can scale to meet demand with minimal overhead and cost. There…
If you have an Azure Web App with multiple custom domains and you want to enable TLS (Transport Layer Security), you’ll need to add a TLS/SSL certificate binding for each hostname. These bindings can be configured individually via the Azure Portal web interface. However, if the number of hostnames is large, updating the TLS/SSL binding…
When it comes to licensing software that is installed on an end user’s device, one of the most secure approaches that we can take as software developers, is to generate and subsequently validate a digitally signed license. With this approach, a cryptographically secure public/private key pair is created that is specific to the software being…