Sign in

Andrew Lock "Sock"

@andrewlock.bsky.social
2.5K followers 351 following 936 posts

Microsoft MVP and blogger, focused on ASP.​NET Core. Author of ASP.​NET Core in Action (mng.bz/5mRz) Blog: andrewlock.net Mastadon: @andrewlock@hachyderm.io Twitter: @andrewlocknet

PostsRepliesMedia
Reposted by Andrew Lock "Sock"
Christophe Nasarre @chrisnas.bsky.social · 28/09/2026
Time to look at Github Copilot in the fourth episode of my long series about AI harnesses internals chrisnas.github.io/posts/2026-0...
chrisnas.github.io
Spying on GitHub Copilot twice: CLI hooks versus VS Code
GitHub Copilot exposes two very different hook surfaces: a rich Copilot CLI stream with weak identity and derived turns, and a thin VS Code agent-hooks Preview with exact tool and agent IDs.
031
Reposted by Andrew Lock "Sock"
ASP.NET Core News @aspnetcore.news · 25/09/2026
Experimental support for Device Bound Session Credentials (DBSC) in ASP .NET Core: Exploring the .NET 11 preview - Part 8 by @andrewlock.bsky.social andrewlock.net/exploring-th... #aspnetcore
011
Andrew Lock "Sock" @andrewlock.bsky.social · 22/09/2026
Blogged: Experimental support for Device Bound Session Credentials (DBSC) in ASP.NET Core - Exploring the .NET 11 preview - Part 8 andrewlock.net/exploring-th... In this post I look at the new experimental support for DBSC coming in .NET 11 #dotnet #security #aspnetcore
andrewlock.net
Experimental support for Device Bound Session Credentials (DBSC) in ASP.NET Core: Exploring the .NET 11 preview - Part 8
In this post I look at the new experimental support for DBSC provided by the Microsoft.AspNetCore.Authentication.DeviceBoundSessions package
083
Reposted by Andrew Lock "Sock"
Kevin Gosse @kevingosse.net · 14/09/2026
If you're still not convinced that we live in the future. I had my 4yo old son try "Putt-Putt", an old point&click game for children. He loves it, so I bought the whole series on Steam. However, it turns out half of them aren't localized in French, so he can't play them.
131
Andrew Lock "Sock" @andrewlock.bsky.social · 15/09/2026
Understanding Device Bound Session Credentials (DBSC) andrewlock.net/understandin... In this post I provide an introduction to Device Bound Session Credentials, I look at how DBSC protects against session hijacking, and how the protocol works. #security #dotnet
andrewlock.net
Understanding Device Bound Session Credentials (DBSC)
In this post I provide an introduction to Device Bound Session Credentials, I look at how DBSC protects against session hijacking, and how the protocol works
085
Reposted by Andrew Lock "Sock"
olegkarasik.bsky.social @olegkarasik.bsky.social · 04/09/2026
A new issue of .NET R&D digest is here! Thanks to @birgitta410.bsky.social, @andrewlock.bsky.social, @lemire.bsky.social, @meziantou.net, @maartenballiauw.be and other great authors for their amazing content! olegkarasik.wordpress.com/2026/09/04/n... #dotnet
olegkarasik.wordpress.com
.NET R&D Digest (August, 2026)
This issue includes bits of life story, AI, C#, security, performance, Aspire, TDD, .NET and of course .NET Internals.
031
Reposted by Andrew Lock "Sock"
Kevin Gosse @kevingosse.net · 04/09/2026
Starting this week, my job at JetBrains changes. I'll be focusing less on ReSharper, and more on agents integration inside our IDEs (Rider, IntelliJ, ...).
152
Andrew Lock "Sock" @andrewlock.bsky.social · 01/09/2026
Blogged: The pain of serializing unions and closed class hierarchies with System.Text.Json in .NET 11 andrewlock.net/exploring-th... In this post I discuss the System.Text.Json support for unions and closed hierarchies coming in .NET 11, the decisions made and some of the sharp edges I hit #dotnet
andrewlock.net
The pain of serializing unions and closed class hierarchies with System.Text.Json: Exploring the .NET 11 preview - Part 7
In this post I discuss the System.Text.Json support for unions and closed hierarchies coming in .NET 11, the decisions made, and some of the sharp edges I hit
1195
Reposted by Andrew Lock "Sock"
Damien Bowden @damienbod.com · 01/09/2026
Blogged: Using multiline Parameters for Aspire and ASP.NET Core with user secrets and Azure default deployments damienbod.com/2026/09/01/u... #aspire #aspnetcore #dotnet #azure #aca #biceps #pem
damienbod.com
Using multiline Parameters for Aspire and ASP.NET Core with user secrets and Azure default deployments
Multiple line secrets or configuration do not work in Aspire per default. An example of this is using a PEM file for certificates. This posts shows how the multiple line configuration parameters ca…
022
Reposted by Andrew Lock "Sock"
Particular Software @particular.net · 31/08/2026
Better know your HTTP headers! If you've seen Sec-Fetch-Dest and friends but never really knew what they were for, you're in luck!
andrewlock.net
Understanding the Fetch Metadata HTTP headers: Sec-Fetch-Site and friends
In this post I describe the Fetch Metadata HTTP headers like Sec-Fetch-Site and Sec-Fetch-Mode which give information to a server about the context of a request
001
Andrew Lock "Sock" @andrewlock.bsky.social · 25/08/2026
Blogged: Finding the total number of processors on a machine with .NET andrewlock.net/finding-the-... In this post I show how to find the total number of logical CPUs on a host (not just those available to a process); something that isn't exposed in modern .NET #dotnet
021
Andrew Lock "Sock" @andrewlock.bsky.social · 11/08/2026
@nuget.org we have packages stuck in "validating" for over 24 hours - what's going on? No response from customer support, and no problems at status.nuget.org, so what's going on? 🤷
status.nuget.org
NuGet | Status
231
Reposted by Andrew Lock "Sock"
olegkarasik.bsky.social @olegkarasik.bsky.social · 04/08/2026
Just published a new issue of .NET R&D Digest! Thx to @rasbt.bsky.social, @maartenballiauw.be, @andrewlock.bsky.social, @kevingosse.net, @meziantou.net, @simonwillison.net & other authors for their g8 content! olegkarasik.wordpress.com/2026/08/04/n... #dotnet
olegkarasik.wordpress.com
.NET R&D Digest (July, 2026)
This issue includes bits of AI, Security, MS SQL, Performance, C#, HTTP and of course .NET and .NET Internals.
023
Reposted by Andrew Lock "Sock"
ASP.NET Core News @aspnetcore.news · 04/08/2026
Understanding the Fetch Metadata HTTP headers: Sec-Fetch-Site and friends by @andrewlock.bsky.social andrewlock.net/understandin... #aspnetcore
011
Andrew Lock "Sock" @andrewlock.bsky.social · 04/08/2026
Blogged: Automatic CSRF protection based on Fetch Metadata headers - Exploring the .NET 11 preview andrewlock.net/exploring-th... In this post I describe the new Cross-Site Request Forgery protection added to ASP.NET Core that uses Fetch Metadata headers instead of tokens #aspnetcore #security
andrewlock.net
Automatic CSRF protection based on Fetch Metadata headers: Exploring the .NET 11 preview - Part 6
In this post I describe the new Cross-Site Request Forgery protection added to ASP.NET Core that uses Fetch Metadata HTTP headers instead of antiforgery tokens
051
Andrew Lock "Sock" @andrewlock.bsky.social · 29/07/2026
Blogged: Understanding the Fetch Metadata HTTP headers: Sec-Fetch-Site and friends andrewlock.net/understandin... In this post I describe the Fetch Metadata HTTP headers like Sec-Fetch-Site and Sec-Fetch-Mode which give information to a server about the context of a request #Security #aspnetcore
andrewlock.net
Understanding the Fetch Metadata HTTP headers: Sec-Fetch-Site and friends
In this post I describe the Fetch Metadata HTTP headers like Sec-Fetch-Site and Sec-Fetch-Mode which give information to a server about the context of a request
020
Andrew Lock "Sock" @andrewlock.bsky.social · 07/07/2026
Blogged: Improvements to reading Process outputs - Exploring the .NET 11 preview - Part 5 andrewlock.net/exploring-th... In this post I show some of the improvements to the Process API in .NET 11 for running processes and reading their outputs without risk of deadlock #dotnet
193
Reposted by Andrew Lock "Sock"
Kevin Gosse @kevingosse.net · 01/07/2026
I published part 10 of my "Writing a .NET Garbage Collector in C#" series: minidump.net/writing-a-ne... This time, I implemented support for finalization, which reveals some intricacies of the .NET runtime.
minidump.net
Writing a .NET Garbage Collector in C#  - Part 10: Finalizers
Using NativeAOT to write a .NET GC in C#. In this part, we add support for finalization.
076
Reposted by Andrew Lock "Sock"
olegkarasik.bsky.social @olegkarasik.bsky.social · 02/07/2026
New issue of .NET R&D Digest is here! Thx to @lemire.bsky.social, @maartenballiauw.be, @chrisnas.bsky.social, @meziantou.net, @andrewlock.bsky.social & other authors for their g8 content! olegkarasik.wordpress.com/2026/07/02/n... #dotnet
olegkarasik.wordpress.com
.NET R&D Digest (June, 2026)
This issue includes bits of AI, software development, C++, C#, diagnostics, architecture and of course .NET and .NET Internals.
064
Reposted by Andrew Lock "Sock"
Immo Landwerth @terrajobst.net · 03/07/2026
And with collection expressions / spread operators it works very nicely:
021
Reposted by Andrew Lock "Sock"
Immo Landwerth @terrajobst.net · 03/07/2026
IMHO: don't use IEnumerable<TheoryData<...>>. Just return TheoryData<...> directly. It makes the code much less verbose. Thanks @andrewlock.bsky.social! andrewlock.net/creating-str...
281
Andrew Lock "Sock" @andrewlock.bsky.social · 30/06/2026
Blogged: Closed class hierarchies - Exploring the .NET 11 preview - Part 4 andrewlock.net/exploring-th... In this post I describe what a closed closed hierarchy is, how to create one, and discuss why you might want one #dotnet #csharp
andrewlock.net
Closed class hierarchies: Exploring the .NET 11 preview - Part 4
In this post I describe what a close closed hierarchy is, how to create one, and discuss why you might want to
020
Reposted by Andrew Lock "Sock"
Christophe Nasarre @chrisnas.bsky.social · 25/06/2026
Let's dig into the new cDAC way to access .NET runtime internals :^) chrisnas.github.io/posts/2026-0... Happy reading!
chrisnas.github.io
Reading CLR internals the cDAC way: contracts instead of the DAC
Why .NET is replacing the DAC with the cDAC data contracts, how they work locally / over a process / from a dump, and how to map the GitHub .md contracts to C# - with a from-scratch !eeheap as a worki...
0106
Andrew Lock "Sock" @andrewlock.bsky.social · 23/06/2026
Blogged: Exploring the .NET 11 preview - Part 3 - Avoiding ToString() allocations with StringBuilder.MoveChunks andrewlock.net/exploring-th... In this post I take a look at the new MoveChunks() API, explore how it works, what it's for, and how the new API provides opportunities for public APIs
andrewlock.net
Avoiding ToString() allocations with StringBuilder.MoveChunks: Exploring the .NET 11 preview - Part 3
in this post I take a short look at the new MoveChunks API, explore how it works, what it's for, and how the new API provides opportunities for public APIs
0112
Reposted by Andrew Lock "Sock"
Damien Bowden @damienbod.com · 15/06/2026
Blogged: Software development and AI damienbod.com/2026/06/15/s... #ai #software #code #copilot
damienbod.com
Software development and AI
This is a bit of rambling from me and what I believe is a good setup for developing software together with AI tools. I believe the AI tools are good, which will help good developers produce better …
061
Reposted by Andrew Lock "Sock"
olegkarasik.bsky.social @olegkarasik.bsky.social · 05/06/2026
One more issue of .NET R&D Digest is here! Thanks to @martinfowler.com, @kentbeck.com, @andrewlock.bsky.social, @b0rk.jvns.ca, and other great authors for the amazing content! olegkarasik.wordpress.com/2026/06/05/n... #dotnet
olegkarasik.wordpress.com
.NET R&D Digest (May, 2026)
This issue includes bits of AI (too much AI), C#, software development, architecture, Windows, security, NTFS and of course .NET and .NET Internals.
193
Andrew Lock "Sock" @andrewlock.bsky.social · 19/05/2026
Blogged: .NET finally gets union types🎉 - Exploring the .NET 11 preview - Part 2 andrewlock.net/exploring-th... In this post I discuss the support for union types released in .NET 11, how they're implemented, the choices made, and how to create your own union types #dotnet
andrewlock.net
.NET finally gets union types🎉: Exploring the .NET 11 preview - Part 2
In this post I discuss the support for union types released in .NET 11, how they're implemented, the choices made, and how to create your own
0146
Reposted by Andrew Lock "Sock"
Damien Bowden @damienbod.com · 18/05/2026
Blogged: Aspire Azure SQL deployment bug damienbod.com/2026/05/18/a... #aspire #azure #dotnet #aspnetcore #sql
damienbod.com
Aspire Azure SQL deployment bug
This week, I was updating my Aspire applications after the latest release and I ran into a deployment bug for my test deployments. I could no longer deploy the database to Azure SQL. I got the foll…
032
Andrew Lock "Sock" @andrewlock.bsky.social · 12/05/2026
Blogged: Running background tasks in Blazor with Web Workers - Exploring the .NET 11 preview - Part 1 andrewlock.net/exploring-th... In this post I discuss the new Web Worker template available in .NET 11 for running CPU intensive tasks without blocking the UI #dotnet #blazor
andrewlock.net
Running background tasks in Blazor with Web Workers: Exploring the .NET 11 preview - Part 1
In this post I discuss the new Web Worker template available in .NET 11 for running CPU intensive tasks without blocking the UI
073
Reposted by Andrew Lock "Sock"
olegkarasik.bsky.social @olegkarasik.bsky.social · 04/05/2026
New issue of .NET R&D Digest is here! Thanks to @lemire.bsky.social, @andrewlock.bsky.social, @martinfowler.com, @meziantou.net, @steplyakov.bsky.social and other authors for their g8 content! olegkarasik.wordpress.com/2026/05/04/n... #dotnet
olegkarasik.wordpress.com
.NET R&D Digest (April, 2026)
This issue includes bits of computer science, AI (unfortunately a lot of AI), academic papers, software development, architecture, performance, scheduling, C#, C++, .NET and .NET Internals.
041
Reposted by Andrew Lock "Sock"
Kevin Gosse @kevingosse.net · 28/04/2026
Up until now, I've always used PowerPoint for my talks: WYSIWYG, can get something decent just by dragging a few elements around. However it quickly becomes a nightmare when dealing with animations or complex layouts.
311
Reposted by Andrew Lock "Sock"
Tim @timburga.com · 28/04/2026
attention git users there are no excuses left for wip wip wip in your repo histories
371
Andrew Lock "Sock" @andrewlock.bsky.social · 28/04/2026
Blogged: New features in Git 2.54: easier rebasing, hooks, and statistics andrewlock.net/new-features... In this post I show some of the new features in Git 2.54 including simple rebases with git history, config-based hooks, and stats with git repo structure #git
andrewlock.net
New features in Git 2.54: easier rebasing, hooks, and statistics
In this post I show some of the new features in Git 2.54 including simple rebases with git history, config-based hooks, and stats with git repo structure
071
Andrew Lock "Sock" @andrewlock.bsky.social · 21/04/2026
Blogged: Removing byte[] allocations in .NET Framework using ReadOnlySpan<T> andrewlock.net/removingbyte... In this post I describe how to remove static byte[] allocations, even on .NET Framework, by using Span<T> look at the associated IL, and discuss the potential risks #dotnet
andrewlock.net
Removing byte[] allocations in .NET Framework using ReadOnlySpan<T>
In this post I describe how to remove static byte[] allocations, even on .NET Framework, by using Span<T>, look at the associated IL, and discuss the risks
092
Reposted by Andrew Lock "Sock"
Christophe Nasarre @chrisnas.bsky.social · 21/04/2026
I'm moving from Medium to Github pages! chnasarre.medium.com/aa972d9ff6c6...
chnasarre.medium.com
I’m moving to chrisnas.github.io
For easier access, I’ve decided to move my blog to github pages at https://chrisnas.github.io/.
181
Andrew Lock "Sock" @andrewlock.bsky.social · 14/04/2026
Blogged: Running AI agents with customized templates using docker sandbox andrewlock.net/running-ai-a... In this post I describe how to create custom templates for Docker Sandboxes, so that your sandboxes start with additional tools immediately available (like .NET) #docker #dotnet
andrewlock.net
Running AI agents with customized templates using docker sandbox
In this post I describe how to create custom templates for Docker Sandboxes, so that your sandboxes start with additional tools immediately available
052
Andrew Lock "Sock" @andrewlock.bsky.social · 07/04/2026
Blogged: Running AI agents safely in a microVM using docker sandbox andrewlock.net/running-ai-a... In this post I show how to run AI coding agents safely while still using YOLO/dangerous mode using docker sandboxes and the sbx tool #ai #docker #sandbox #claude
andrewlock.net
Running AI agents safely in a microVM using docker sandbox
In this post I show how to run AI coding agents safely while still using YOLO/dangerous mode using docker sandboxes and the sbx tool
4102
Reposted by Andrew Lock "Sock"
olegkarasik.bsky.social @olegkarasik.bsky.social · 03/04/2026
New issue of .NET R&D Digest is here! Thx to @simonwillison.net, @birgitta410.bsky.social, @kief.com, @lemire.bsky.social, @kevingosse.net, @andrewlock.bsky.social, @meziantou.net, @stevesanderson.bsky.social & other authors for their g8 content! #dotnet olegkarasik.wordpress.com/2026/04/03/n...
olegkarasik.wordpress.com
.NET R&D Digest (March, 2026)
This issue includes bits (or I would rather say bytes) of AI, bits of software development, operating systems, web, diagnostics, performance, C++, C#,  and of course .NET and .NET Internals.
093
Andrew Lock "Sock" @andrewlock.bsky.social · 01/04/2026
Blogged: Configuring contextual options with Microsoft.Extensions.Options.Contextual andrewlock.net/configuring-... In this post I take a brief look at the Microsoft.Extensions.Options.Contextual package to understand what it's for, how to use it, and discuss whether to use it or not #dotnet
andrewlock.net
Configuring contextual options with Microsoft.Extensions.Options.Contextual
In this post I take a brief look at the Microsoft.Extensions.Options.Contextual package to understand what it's for, how to use it, and whether to use it or not
051
Reposted by Andrew Lock "Sock"
Ilya Kashnitsky @ikashnitsky.phd · 31/03/2026
I can hardly believe that (finally!) there is a great file explorer alternative for those of us who have to stick with windows -- File Pilot is absolutely sleek and marvelous 😍 🔗 filepilot.tech ht @andrewlock.bsky.social (andrewlock.net/windows-expl...)
screenshot of the main page of File Pilot project website at https://filepilot.tech/
061
Andrew Lock "Sock" @andrewlock.bsky.social · 24/03/2026
Ah good, another virtual MVP Summit and because Microsoft Teams is terrible, I can't watch any of it. Classic 🙄
250
Reposted by Andrew Lock "Sock"
Jeremy D. Miller (The Shade Tree Developer) @jeremydmiller.bsky.social · 22/03/2026
Announcing Polecat: Event Sourcing with SQL Server jeremydmiller.com/2026/03/22/a... I'll happily take any RTs please and thank you! #polecat #critterstack #sqlserver
jeremydmiller.com
Announcing Polecat: Event Sourcing with SQL Server
Polecat is now completely supported by JasperFx Software and automatically part of any existing and future support agreements through our existing plans. Polecat was released as 1.0 this past week …
11111
Reposted by Andrew Lock "Sock"
Duende Software @duendesoftware.com · 20/03/2026
Want the power of Duende IdentityServer but with faster time-to-value? ⏱️ We’re previewing a first-party user management .NET SDK on March 24th that gives you Passkeys, MFA, and audit trails out-of-the-box. Keep your data control, ditch the custom coding. RSVP: duende.link/78q3hk #dotnet #aspnet
duende.link
A First Look at Duende User Management | Duende
Join us March 24 for a first look at Duende User Management. Learn to replace ASP.NET Identity with built-in Passkeys, MFA, and audits.
033
Reposted by Andrew Lock "Sock"
Kevin Gosse @kevingosse.net · 17/03/2026
Have you ever noticed that a simple .NET Core applications on 64-bit uses more than 2TB of virtual memory? In a new episode of the series "writing a .NET garbage collector in C#", we discover the kind of problem that it intends to solve: minidump.net/writing-a-ne...
minidump.net
Writing a .NET Garbage Collector in C#  - Part 9: Frozen segments and new allocation strategy
Using NativeAOT to write a .NET GC in C#. In this part, we look at what the GC must do to properly handle frozen segments, and we change the allocation strategy to make it more efficient.
3635
Reposted by Andrew Lock "Sock"
Patrik Svensson @patriksvensson.se · 11/03/2026
I wrote something on LinkedIn: www.linkedin.com/posts/psvens... I'm looking for a new gig and/or employment (if interesting enough). Please repost if you can! Much appreciated!
linkedin.com
#dotnet #csharp #opensource #staffengineer #softwareengineering #consulting | 👨‍💻 Patrik Svensson
🚀 I’m wrapping up my current engagement soon and starting to look for my next technical challenge. I’ll be available again starting April 10. A bit about me: • 20+ years of experience building and d...
11716
Andrew Lock "Sock" @andrewlock.bsky.social · 10/03/2026
This looks like a nice clean solution to a wart on .NET's localization functionality - using Fody to set a default ErrorMessageResourceType and ErrorMessageResourceName (based on the attribute type). github.com/mrpmorris/Au... Seems crazy that this is necessary though - am I missing something?!
github.com
GitHub - mrpmorris/AutoLocalize: Automatically localize DataAnnotations validation attributes in .NET
Automatically localize DataAnnotations validation attributes in .NET - mrpmorris/AutoLocalize
352
Andrew Lock "Sock" @andrewlock.bsky.social · 10/03/2026
Blogged: Splitting the NetEscapades.EnumGenerators packages: the road to a stable release andrewlock.net/splitting-th... In this post I describe the recent architectural changes to the NetEscapades.EnumGenerators package, which is now a metapackage, to support more scenarios #dotnet
andrewlock.net
Splitting the NetEscapades.EnumGenerators packages: the road to a stable release
In this post I describe the recent architectural changes to the NetEscapades.EnumGenerators package, which is now a metapackage, to support more scenarios
030
Andrew Lock "Sock" @andrewlock.bsky.social · 24/02/2026
Blogged: Recording metrics in-process using MeterListener andrewlock.net/recording-me... In this post I show how you can use MeterListener to listen to Instrument measurements, how to trigger Observable measurements, and how to aggregate values #dotnet #observability
andrewlock.net
Recording metrics in-process using MeterListener: System.Diagnostics.Metrics APIs - Part 4
In this post I show how you can use MeterListener to listen to Instrument measurements, how to trigger Observable measurements, and how to aggregate values.
042
Reposted by Andrew Lock "Sock"
Kevin Gosse @kevingosse.net · 20/02/2026
I got "tricked" by PerfView when using it to measure the effectiveness of my optimizations, so I decided to write about it: minidump.net/an-unexpecte... It's not specific to PerfView though, in theory this could happen with any profiler.
minidump.net
Too good to be true: an unexpected profiler trap
Sometimes the most convincing performance gains deserve a second look. A reminder that profiling data can be more subtle than it first appears.
185
Reposted by Andrew Lock "Sock"
David Whitney @davidwhitney.co.uk · 17/02/2026
Ok, so I wrote a very long and kinda personal thing about existential dread and the end of programming, and I'm not really sure I want to endure the discourse, but if you want to read it, it's here - gist.github.com/davidwhitney... It's like 6,000 words long, sorry.
10299