Generic Linear Search/Sequential Search for a sequence in C# .NET
To practice algorithms and data structures, I reimplemented Linear Search/Sequential Search for a sequence using C#'s generic type parameters.
Generic Boyer–Moore–Horspool algorithm in C# .NET
To practice algorithms and data structures, I reimplemented Boyer–Moore–Horspool algorithm for a sequence using C#'s generic type parameters.
Generic Binary Search in C# .NET
To practice algorithms and data structures, I reimplemented binary search using C#'s generic type parameters.
Generic Insertion Sort in C# .NET
To practice algorithms and data structures, I reimplemented insertion sort using C#'s generic type parameters.
Generic Quick Sort in C# .NET
To practice algorithms and data structures, I reimplemented Quick Sort using C#'s generic type parameters.
Generic Merge Sort in C# .NET
To practice algorithms and data structures, I reimplemented merge sort using C#'s generic type parameters.
Generic Bubble Sort in C# .NET
To practice algorithms and data structures, I reimplemented bubble sort using C#'s generic type parameters.
Download the right ChromeDriver version & keep it up to date on Windows/Linux/macOS using C# .NET
Chrome frequently updates automatically causing ChromeDriver versions to mismatch. Using C# .NET you can download the correct version of the ChromeDriver and keep it up-to-date.
Better Authentication with Twilio API Keys
API Keys are now the preferred way to authenticate with Twilio's API. You can create as many API Keys as you need and remove them if they are compromised or no longer used.
Use project Tye to host Blazor WASM and ASP.NET Web API on a single origin to avoid CORS
Using Microsoft's experimental Project Tye, you configured the proxy to forward requests to '/api' to the Web API, and all other requests to the Blazor WASM client.
Use YARP to host client and API server on a single origin to avoid CORS
Using Microsoft's new reverse proxy "YARP", you configured the proxy to forward requests to '/api' to the Web API, and all other requests to the Blazor WASM client.
How to deploy Blazor WebAssembly to Firebase Hosting
With ASP.NET Blazor WebAssembly you can create .NET applications that run completely inside of the browser. The output of a Blazor WASM project are all static files. You can deploy these applications to various static site hosts like Firebase Hosting.
Harden Anti-Forgery Tokens with IAntiforgeryAdditionalDataProvider in ASP.NET Core
Using IAntiforgeryAdditionalDataProvider you can harden ASP.NET Core's anti-forgery token feature by adding additional data and validating the additional data.
Rethrowing your exceptions wrong in .NET could erase your stacktrace
You may be erasing your stacktrace if you are catching and rethrowing exceptions the wrong way. This could make debugging a nightmare because you don't know where the exception was originally thrown.
Checking out NDepend: a static code analysis tool for .NET
NDepend is a static code analysis tool (SAST) for .NET. NDepend will analyze your code for code smells, best practices, complexity, dead code, naming conventions, and much more.
How to add Hangfire to DNN
DNN already has an excellent built-in scheduler you can use to schedule tasks. But you may be more familiar with and prefer Hangfire for running background jobs. These instruction will walk you through configuring Hangfire in with DNN.
Introducing NCrontab Tester (Blazor WebAssembly)
Introducing NCrontab Expression tester, made using NCrontab .NET library, Blazor WebAssembly, and hosted on Azure Static Web Apps
Download .NET Windows Theme based on the new .NET Brand GitHub repo
The .NET GitHub org has a new Brand repository containing a detailed Brand guidelines PDF, logo's, illustrations, and wallpapers. Using these resources I put together a Windows Theme for .NET which you can download here!
How to run ASP.NET Core Web Application as a service on Linux without reverse proxy, no NGINX or Apache
This article walks us through running a ASP.NET Core web application on Linux (RHEL) using systemd. The end goal is to serve ASP.NET Core directly via the built-in Kestrel webserver over port 80/443.
How to run a .NET Core console app as a service using Systemd on Linux (RHEL)
Let's learn how to run a .NET Core console application on systemd. After running a console app as a service, we'll upgrade to using the dotnet core worker service template designed for long running services/daemons. Lastly, we'll add the systemd package integration.
Implementing Responsive Images in Umbraco
The web platform has responsive image capabilities such as the srcset-attribute, sizes-attribute, and the picture-element. These capabilities may seem daunting sometimes. We'll learn how to make them available and maintainable to Umbraco content editors.
VS Code C# Extension not working in Remote SSH mode on Red Hat Linux? Here's a workaround
Unfortunately, the C# Extension for VS Code malfunctions when following the official steps to install .NET Core on Red Hat and using the Remote SSH extension. OmniSharp is not able to find the .NET Core installation but we can work around this.
Auto generate Heading Anchors using HTML AgilityPack DOM Manipulation
Manually adding an anchor to every heading would be a painful solution. So let's learn how we can achieve this by generating the Heading Anchors using the HTML AgilityPack .NET library.
How to run .NET Core Selenium UI tests on Azure DevOps Pipelines Windows/Ubuntu agents? 🚀
his post discusses how to take those UI tests and run them in Azure DevOps Pipelines on both Windows & Ubuntu agents. Use this GitHub repository which contains the UI test project necessary to follow along in this post.
How to UI test using Selenium and .NET Core on Windows, Ubuntu, and MacOS
Selenium is a browser 🌐 automation tool mainly used for UI testing and automating tasks. Selenium is agnostic of operating system, programming language, and browser. You can automate Chrome on MacOS using C#, FireFox using Python on Windows, or Opera using NodeJS on Linux to give you a few examples.
Creating a Discord Bot using .NET Core and hosting it on Azure App Services
Discord is an online communication platform built specifically for gaming. Using .NET Core and Azure App Service WebJobs we can host a Discord bot that can listen and respond to voice and text input.
Crawling through Umbraco with Robots
The robots.txt file’s main purpose is to tell robots (Google Bot, Bing Bot, etc.) what to index for their search engine, and also what not to. Usually you want most of your website crawled by Google, such as blog posts, product pages, etc., but most websites will have some pages/sections that shouldn’t be indexed or listed in search engines.
Ignoring Umbraco ping.aspx from Azure Application Insights
Application Performance Monitors provide you with a lot of data, but some of that data may not be relevant. Specifically, in Umbraco there is a page at \umbraco\ping.aspx that is being called frequently to keep the site alive. This is very useful to prevent the site from "dying" (?), but the data for this request isn't that relevant and could skew your statistics. Using Azure Application Insights ITelemetryProcessor, we can prevent ping request from being sent to Azure Application Insights.
Crawling through Umbraco with Sitemaps
Websites come in all shapes and sizes. Some are fast, some are beautiful, and some are a complete mess. Whether it's a high-quality site is irrelevant if people can’t find it, but search engines are here to help. Though the competition to get on first page is tough, this series will dive into some common practices to make your website crawlable.