C# – Best way to Throw Exception If Null

.NET 6 introduced a few new helper methods to deal with throwing exceptions, and one of them is ThrowIfNull. The usage is simple: The method will throw a ArgumentNullException when myParam is null. It will do nothing otherwise. ThrowIfNull can take in two parameters: Note: paramName uses CallerArgumentExpressionAttribute to retrieve the name of your parameter…

| |

The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

This error usually means that there is a mismatch between the AppService Stack and .NET version and your app’s target framework. This can happen when you upgrade your web app, but you do not update the runtime of the App Service. This is a common occurence for ASP.NET MVC and Web API projects going through…

|

Azure Functions vs WebJobs – Which to choose

Both are code-first technologies targeting developers (as opposed to design-first workflow services). They enable the orchestration and integration of different business applications into a single workflow and provide more control over the performance of your workflow plus the ability to write custom code as part of the business process. Azure WebJobs WebJobs are a part…

| |

Which to choose: Logic Apps vs Microsoft Power Automate

Both are design-first technologies, meaning that they provide user interfaces allowing you to draw-out your workflows as opposed to coding them. Other similarities between the two: They both can accept inputs Can run actions Able to control the workflow using conditions Can produce outputs Logic Apps Logic Apps is a service provided by Azure which…

| |

Creating a cross-platform chat app using Xamarin Forms and SignalR

In less than 5 minutes. First step is to create your Xamarin Forms projects – start with a blank shell app – and add an additional blank ASP.NET Core project to the solution – we will use it to host our SignalR backend. Once the projects are setup, we begin by implementing the ChatHub which…

How to fix WordPress Missing MySQL extension after MultiPHP upgrade on HostGator

After upgrading your WordPress site’s PHP version using the MultiPHP manager to use PHP 7, you might be running into the following error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. This is caused by an obsolete handler in your .htaccess file. Fixing it OR Save the file…

| |

How to publicly expose your local SignalR service for consumption by mobile clients using ngrok

When dealing with mobile clients, it’s not always easy to get them on the same network as your development machine and even when you do, localhost will have a different meaning so you need to use IPs and change bindings and disable SSL or trust self-signed certificates, in short it’s a pain. Say hello to…