Copy HTTP Requests from Chrome/Edge DevTools to PowerShell/cURL/Fetch
You can copy the recorded HTTP requests the from Chrome and Edge DevTools to PowerShell/cURL/Fetch. This allows you to quickly replay HTTP requests from the console/command line saving saving you time!
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!
Prey: a game out of this world (5⭐)
Prey is a first-person thriller/horror shooter situated in a massive space station orbiting the moon. Aliens have infested the station and it's up to you to make sure the aliens don't reach Earth. The game provides a large variety of game mechanics like crafting, collecting, inventory management, sneaking, platforming, puzzling, and satisfying combat.
Use PowerShell to communicate with Dynamics CRM using the .NET XRM SDK
If you've developed client applications or plugins for Dynamics CRM before, you are familiar with the CRM/XRM DLL's. You may have gotten those DLL's from the CRM installation, the SDK zip, or the NuGet package. Another way to interact with the CRM DLL's is through PowerShell. PowerShell is built upon .NET meaning you can call exactly the same CRM libraries from PowerShell as from .NET applications.
PowerShell snippet: Get optionset value/labels from Dynamics CRM Entity/Attribute
Instead of having to use the CRM interface to copy all the labels and values manually, you can save yourself a lot of time using this PowerShell script. Using the following script file named "GetOptionSet.ps1", you can list all the value/label pairs for a given Entity + OptionSet-Attribute:
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 aconsole app as a service, we'll upgrade to using the worker 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.
Querying data using raw SQL & Stored Procedures in Entity Framework Core
When LINQ queries can't meet the performance requirements of your application, you can leverage Raw SQL and still have EF map the data to concrete .NET objects. You can also invoke Stored Procedures in case the logic of the SQL queries need to reside in the SQL Database.
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 maybe 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.
Deleting old web app logs using Azure Web Jobs and PowerShell
When you're Azure App Service writes a lot of logs, these logs can quickly pile up and even hit your "File system storage" quota limits. This was something I personally didn't pay attention to for quite some time and was surprised to find multiple gigabytes of logs sitting in my app service. To solve this issue, you can use a PowerShell script and a time triggered Azure Web Job.
Bulk add IP Access Restrictions to Azure App Service using Az PowerShell
Azure App Services are publicly accessible via Azure's public DNS in the format of "[NAME].azurewebsites.net", but there are many reasons for not wanting it to be accessible via the DNS. This script uses the Az PowerShell module to bulk add IP Ranges into the Access Restriction feature in App Service.
Bulk add Cloudflare's IPs to Azure App Service Access Restrictions using Az PowerShell
Azure App Services are publicly accessible via Azure's public DNS, but when using Cloudflare you should lock this down to only allow Cloudflare to reach your service. This script will add all Cloudflare's IP ranges to your app service Access Restriction.
Bulk add Application Insights Availability Test IPs to Azure App Service Access Restrictions using Az PowerShell
Azure App Services are publicly accessible via Azure's public DNS, but using Access Restrictions you can lock this down. To ensure your App Insight Availability Tests still work, you can use this PowerShell script to bulk insert all the IP ranges.
Clearing Cloudflare cache using PowerShell in Azure DevOps Pipelines
Learn how to purge Cloudflare's cache as part of your Continuous Deployment. This post will walk you through creating a PowerShell task that interacts with Cloudflare's API to clear the cache. This task will run as part of an Azure DevOps Pipelines.
Instead of slowing down our site and feeding advertisement profiles, we can use plain HTML to provide social sharing functionality. This post will cover social sharing to Twitter, Reddit, LinkedIn, and Facebook.
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.
PowerShell Snippet: Clearing Cloudflare Cache with Cloudflare's API
Cloudflare provides a GUI to purge cache, but every action you can perform using the GUI, you can also do with Cloudflare's API. You could use the API to auto purge the cache whenever you update content in your CMS of choice, or purge the cache as part of your Continuous Delivery pipeline. Using PowerShell we'll interact with Cloudflare's API and purge their cache.
Setting up Cloudflare Full Universal SSL/TLS/HTTPS with an Azure App Services
Using Cloudflare's Universal SSL/TLS service, we can provide our website over a safe HTTPS connection. This post walks you through setting up the SSL/TLS encrypted connection from client to Cloudflare, to your Azure Web Application using the Full (strict) option and Cloudflare's origin certificates.
PowerShell Snippet: Crawling a sitemap
Here's a PowerShell function that you can use to validate that all pages in your sitemap return a HTTP Status code 200. You can also use it to warm up your website, or ensure your website caching is warm after a cold boot. I personally use it as part of my Continuous Delivery pipeline to warm up my site and Cloudflare's cache.
Web performance: prevent wasteful hidden image requests (display: none)
We often hide images using CSS with "display: none", but this doesn't actually prevent the browser from downloading these images. Using the HTML Picture element, we can serve different versions of an image depending on media queries. We can even use a data-img to prevent images from being downloaded at all and optimize our website speed.
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.
Exploring VueJS and Firebase
Updated Ajax + SEO Guidelines
When you build an Ajax based website and want to be SEO friendly, there are a couple of techniques you have to apply. Back in 2009, Google made a proposal on how to make your Ajax pages crawlable.