.NET Articles

Set asp-append-version True by Default for JavaScript, & CSS to the Bust Cache

When I add a JavaScript file or CSS file in .NET, I want asp-append-version set to true 99.9% of the time. This way I don't have to tell users or testers to clear their cache. Here's an easy way to set the default to true to avoid writing it each time.

How to Debug SQL Exception: String or Binary Data Would Be Truncated in .NET EF Core

Ever run into a SQL Exception error where you tried to submit a string that was too long but you couldn't figure out which value caused the error?

Visual Studio - Unable to launch the IIS Express Web server

I run into this error on occasion, more often on old websites. Failed to register URL "http://localhost:{PortNumber}" for site {SiteName} application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)

Using Tailwind CSS with Blazor

A quick guide to adding Tailwind to Blazor or any .NET project.

C# Use the Task Parallel library, including theParallel.For method, PLINQ, Tasks

In preperation for the Microsoft Programming in C# 70-483 exam, I've created a free study guide.

Microsoft C# Exam 70-483 Free Study Guide - Skip the Dumps & Pass the Programming Test

In preperation for the Microsoft Programming in C# 70-483 exam, I've created a free study guide.

How to Turn on Detailed Exceptions in CircuitOptions.DetailedErrors with Blazor

I ran into the following error while working with Blazor. Error: There was an exception invoking 'MethodName' on assembly 'AssemblyName'. For more details turn on detailed exceptions in 'CircuitOptions.DetailedErrors'. Here's the fix.

Clean Up & Sort Unused .NET Using Statements in Visual Studio

No need for an extension or ReSharper to sort and remove unnecessary using statements in .NET projects with Visual Studio. This is now built in, but you have to enable it.

Fixing Entity Framework Validation 30000 No Type Specified for the Decimal Column

Here's a quick fix for Entity Framework's Validation 30000 errors that show up on decimal columns.

NotSupportedException No IUserTwoFactorTokenProvider <TUser> named 'Default' is registered

While messing around with .NET Core 2 and Identity, I ran into this error.

Scrape a Website & Send an E-mail with Azure Functions

Serverless Functions are an awesome way to create small tasks that can run on a schedule, by the click of a button or using your voice. We'll create a function that visits a website, collects important data & sends that via an e-mail back to us on a schedule.

Hosting Blazor on Netlify

Since Blazor is a frontend framework, we can host our Blazor apps on any serverless or static web host. The only requirement is that we can add minor configuration to redirect URLs so that all URLs point to our index.html page. Netlify fits this perfect. Netlify also happens to be my favorite host for static websites.

How to Access the Hosting Environment in ConfigureServices

It can be useful to run different services in Development vs Production. The .NET Core templates do this within certain methods, such as the Configure method in the Startup class but there is no example of how to do it in the ConfigureServices method within the Startup Class.

Keep Your Startup Clean

Don't let your Startup.cs file turn into a mess. Use extension methods to keep it clean.

SqlException: Arithmetic overflow error converting numeric to data type numeric.

I ran into this SQL Server error when using Entity Framework in a .NET Core project. It's a simple mistake easy to make.
Let's Connect