Andrew Lock "Sock"

Andrew Lock "Sock"

@andrewlock.bsky.social

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

2.4K followers352 following940 posts

Blogged: An introduction to Compact Binary Object Notation (CBOR) in .NET andrewlock.net/an-introduct... In this post I introduce CBOR as a JSON alternative, and show how to use the System.Formats.Cbor NuGet package to read and write CBOR encoded data #dotnet #aspnetcore

andrewlock.netAn introduction to Compact Binary Object Notation (CBOR) in .NETIn this post I introduce CBOR as a JSON alternative, and show how to use the System.Formats.Cbor NuGet package to read and write CBOR encoded data

Andrew Lock "Sock" reposted

Stripping extra dependencies in .NET NativeAOT apps using linker substitutions andrewlock.net/stripping-ex... In this post I describe how to perform method substitutions with the NativeAOT linker to remove additional dependencies that the linker couldn't see were unused #dotnet #nativeaot

andrewlock.netStripping extra dependencies in .NET NativeAOT apps using linker substitutionsIn this post I describe how to perform method-substitutions with the NativeAOT linker to remove additional dependencies that the linker couldn't see were unused

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.netExperimental support for Device Bound Session Credentials (DBSC) in ASP.NET Core: Exploring the .NET 11 preview - Part 8In this post I look at the new experimental support for DBSC provided by the Microsoft.AspNetCore.Authentication.DeviceBoundSessions package

Andrew Lock "Sock" reposted

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.

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.netUnderstanding 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

Andrew Lock "Sock" reposted

Andrew Lock "Sock" reposted

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, ...).

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.netThe pain of serializing unions and closed class hierarchies with System.Text.Json: Exploring the .NET 11 preview - Part 7In 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

Andrew Lock "Sock" reposted

Andrew Lock "Sock" reposted

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.netAutomatic CSRF protection based on Fetch Metadata headers: Exploring the .NET 11 preview - Part 6In 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

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.netUnderstanding the Fetch Metadata HTTP headers: Sec-Fetch-Site and friendsIn 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

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.netAvoiding ToString() allocations with StringBuilder.MoveChunks: Exploring the .NET 11 preview - Part 3in 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

Andrew Lock "Sock" reposted

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 2In 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

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.netRunning background tasks in Blazor with Web Workers: Exploring the .NET 11 preview - Part 1In this post I discuss the new Web Worker template available in .NET 11 for running CPU intensive tasks without blocking the UI

Andrew Lock "Sock" reposted

Andrew Lock "Sock" reposted

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.

Andrew Lock "Sock" reposted

attention git users there are no excuses left for wip wip wip in your repo histories

Andrew Lock "Sock"@andrewlock.bsky.social

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

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.netNew features in Git 2.54: easier rebasing, hooks, and statisticsIn 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

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.netRemoving 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

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.netRunning AI agents with customized templates using docker sandboxIn this post I describe how to create custom templates for Docker Sandboxes, so that your sandboxes start with additional tools immediately available

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.netRunning AI agents safely in a microVM using docker sandboxIn this post I show how to run AI coding agents safely while still using YOLO/dangerous mode using docker sandboxes and the sbx tool

Andrew Lock "Sock" reposted

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.netConfiguring contextual options with Microsoft.Extensions.Options.ContextualIn 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

Andrew Lock "Sock" reposted

Andrew Lock "Sock" reposted

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.linkA First Look at Duende User Management | DuendeJoin us March 24 for a first look at Duende User Management. Learn to replace ASP.NET Identity with built-in Passkeys, MFA, and audits.

Andrew Lock "Sock" reposted

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.netWriting a .NET Garbage Collector in C#  - Part 9: Frozen segments and new allocation strategyUsing 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.