About:

Andrew Lock, known as 'Sock', is a developer and author specializing in ASP.NET Core, with a background in engineering and medical image processing.

Website:

Specializations:

Interests:

ASP.NET Core C# VB ASP.NET MVC WebForms C++ WinForms Medical Image Processing

Incoming Links:

Subscribe to RSS:
A technique to eliminate memory allocation in foreach loops on IEnumerable<T> in C# is explored, including benchmarks and the use of Reflection.Emit.
The blog post discusses the CVE-2025-55315 vulnerability in ASP.NET Core, rated 9.9 by Microsoft, highlighting the risks of HTTP request smuggling. It explains how the vulnerability allows attackers to bypass security features by ...
This post explores the new platform-specific NuGet package support introduced in .NET 10, focusing on how tool authors can maintain compatibility with older .NET SDK versions. It discusses the advantages and trade-offs of using se...
This blog post discusses improvements to the [UnsafeAccessor] mechanism introduced in .NET 8 and further enhanced in .NET 10. It explains how [UnsafeAccessor] allows for easier access to private fields and methods without using re...
This blog post is the seventh in a series exploring the .NET 10 preview, focusing on the new feature that allows packaging platform-specific .NET tools. It discusses various packaging methods including self-contained, trimmed, and...
The restructuring of the NetEscapades.EnumGenerators package introduces three new packages to enhance enum handling performance and addresses user concerns about recent changes.
This blog post explains how metadata functions for fallback endpoints in ASP.NET Core. It begins with an overview of the routing infrastructure, detailing how incoming URLs are mapped to handlers. The author discusses the signific...
This post details the author's experience troubleshooting a .NET Core application that encountered a 'System.DllNotFoundException' error while running on Alpine Linux 3.17. The author describes the steps taken to isolate the issue...
This post discusses the TUnit testing framework, a new alternative to xUnit, NUnit, and MSTest for .NET applications. It highlights TUnit's features such as source-generated tests, parallel execution, and Native AOT support. The a...
This post explains how to run .NET applications in the browser using WebAssembly (WASM) without relying on Blazor. It covers the installation of experimental WASM templates, the creation of a simple stopwatch application, and the ...
The post discusses the rapid pace of .NET updates and the limited support duration provided by Microsoft, suggesting that instead of slowing down .NET, organizations should consider paying for post-End of Life (EOL) support. It ex...
NetEscapades.EnumGenerators version 1.0.0-beta19 enhances enum handling in C# with performance improvements and new features like disabling number parsing and ReadOnlySpan<char> support.
This post discusses recent updates to the NetEscapades.EnumGenerators NuGet package, which enhances performance when working with enums in .NET. It highlights the introduction of support for [EnumMember] attributes, improvements i...
This post explains how to use nuget.org's Trusted Publishing feature to publish NuGet packages directly from a GitHub Actions workflow without the need for API keys, enhancing security. It outlines the traditional methods of pushi...
This blog post describes the creation of a .NET tool that forces a Windows PC to sleep after a specified timer expires. The author details the use of the Win32 API to implement this functionality, starting with a simple proof of c...
This post discusses the complexities of authoring .NET tools, particularly regarding version compatibility of the .NET runtime. It provides insights on installing and managing .NET tools using a tools manifest, the importance of m...
The post explains how to use MeterListener in an ASP.NET Core app to record and display metrics in real-time using Spectre.Console.
This post introduces the System.Diagnostics.Metrics API for creating application metrics and demonstrates local monitoring with dotnet-counters and custom metric creation in ASP.NET Core.
The post critiques the Microsoft.Extensions.Telemetry.Abstractions source generator for System.Diagnostics.Metrics APIs, arguing it offers limited benefits over manual coding practices.
This blog post explains how to enable diagnostics for the .NET host to debug issues in .NET applications. It focuses on the host tracing feature, which provides detailed diagnostic information about the boot process of a .NET appl...
The post explains the different types of instruments in System.Diagnostics.Metrics APIs, highlighting how to create and utilize observable and non-observable metrics in .NET applications.
A guide to building a basic .NET CLR profiler in C# using Kevin Gosse's Silhouette library, highlighting its simplicity compared to traditional C++ methods.
Zed editor offers a fast and smooth experience for .NET editing but lacks essential Markdown features, prompting the author to continue using VS Code.
File Pilot is a fast and customizable alternative to Windows File Explorer, praised for its speed and user-friendly features.