Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Day: November 13, 2026

Docker

Docker: Fix a Multi-Stage Build Using Stale Dependencies Because a package.json Comment Edit Never Changed the Cache Key

- 13.11.26 - ErcanOPAK comment on Docker: Fix a Multi-Stage Build Using Stale Dependencies Because a package.json Comment Edit Never Changed the Cache Key

🐳 Docker: Fix a Multi-Stage Build Using Stale Dependencies Because a package.json Comment Edit Never Changed the Cache Key Docker’s layer cache keys a COPY instruction by the exact bytes of the files it copies, which sounds precise enough to trust β€” but a Dockerfile that copies the whole project directory in one COPY . […]

Read More
AI

The AI Prompt That Reads a Lease Agreement and Flags Every Clause Stricter Than What’s Actually Legal in Your State

- 13.11.26 - ErcanOPAK comment on The AI Prompt That Reads a Lease Agreement and Flags Every Clause Stricter Than What’s Actually Legal in Your State

πŸ€– The AI Prompt That Reads a Lease Agreement and Flags Every Clause Stricter Than What’s Actually Legal in Your State Landlords and property management companies frequently reuse a lease template written for a different state, or one that predates a local tenant-protection law, and most renters have no realistic way to compare dozens of […]

Read More
AI

The AI Prompt That Reviews a Pull Request Diff Specifically for Race Conditions a Normal Code Review Would Miss

- 13.11.26 - ErcanOPAK comment on The AI Prompt That Reviews a Pull Request Diff Specifically for Race Conditions a Normal Code Review Would Miss

πŸ€– The AI Prompt That Reviews a Pull Request Diff Specifically for Race Conditions a Normal Code Review Would Miss A race condition rarely looks wrong when you read the changed lines in isolation β€” the bug is almost always in the interaction between this diff and code elsewhere that runs concurrently with it, which […]

Read More
Wordpress

WordPress: Fix a Site Stuck in Maintenance Mode Forever After an Auto-Update Because the .maintenance File Was Never Removed When a Second Update Started Mid-Process

- 13.11.26 - ErcanOPAK comment on WordPress: Fix a Site Stuck in Maintenance Mode Forever After an Auto-Update Because the .maintenance File Was Never Removed When a Second Update Started Mid-Process

πŸ“ WordPress: Fix a Site Stuck in Maintenance Mode Forever After an Auto-Update Because the .maintenance File Was Never Removed When a Second Update Started Mid-Process WordPress puts the entire site into maintenance mode by writing a tiny .maintenance file to the site’s root directory the instant a core or plugin update begins, and removes […]

Read More
Wordpress

WordPress: Fix a Custom REST Endpoint Returning 401 Only for Logged-In Users Because the Nonce Check Ran Before permission_callback

- 13.11.26 - ErcanOPAK comment on WordPress: Fix a Custom REST Endpoint Returning 401 Only for Logged-In Users Because the Nonce Check Ran Before permission_callback

πŸ“ WordPress: Fix a Custom REST Endpoint Returning 401 Only for Logged-In Users Because the Nonce Check Ran Before permission_callback register_rest_route()’s permission_callback is meant to be the single place that decides whether a request is allowed through, but a lot of hand-written endpoints add their own manual check_ajax_referer() or wp_verify_nonce() call inside the route’s main […]

Read More
Windows

Windows 11: Fix Bluetooth Headphones Reconnecting to the Wrong Audio Profile Because a Stale Driver Survived a PC Swap

- 13.11.26 - ErcanOPAK comment on Windows 11: Fix Bluetooth Headphones Reconnecting to the Wrong Audio Profile Because a Stale Driver Survived a PC Swap

πŸͺŸ Windows 11: Fix Bluetooth Headphones Reconnecting to the Wrong Audio Profile Because a Stale Driver Survived a PC Swap Bluetooth headphones that support both a high-quality stereo profile (A2DP) and a low-quality hands-free profile (HFP, used for calls and mic input) store a cached driver and profile preference per device pairing on the Windows […]

Read More
Asp.Net Core

Asp.Net Core: Fix a Cookie Authentication Ticket Expiring Early Because SlidingExpiration Only Renews the Cookie Itself, Not the Server-Side Session Store Backing It

- 13.11.26 - ErcanOPAK comment on Asp.Net Core: Fix a Cookie Authentication Ticket Expiring Early Because SlidingExpiration Only Renews the Cookie Itself, Not the Server-Side Session Store Backing It

βš™οΈ Asp.Net Core: Fix a Cookie Authentication Ticket Expiring Early Because SlidingExpiration Only Renews the Cookie Itself, Not the Server-Side Session Store Backing It Cookie authentication’s SlidingExpiration option extends the authentication cookie’s own expiry every time a request comes in during the back half of its current lifetime, which works perfectly well on its own […]

Read More
CSS

CSS: Fix a Flexbox Child’s min-width Silently Overriding Its Set width Because the Default Was Never Reset to 0

- 13.11.26 - ErcanOPAK comment on CSS: Fix a Flexbox Child’s min-width Silently Overriding Its Set width Because the Default Was Never Reset to 0

🎨 CSS: Fix a Flexbox Child’s min-width Silently Overriding Its Set width Because the Default Was Never Reset to 0 Every flex item has an implicit min-width (or min-height in a column flex container) of auto by default, which the spec defines as roughly the size of the item’s content at its largest unbreakable point […]

Read More
HTML

HTML5: Fix a Custom Element’s Encapsulated Styles Leaking Into the Rest of the Page Because a style Tag Landed Outside Its Shadow Root

- 13.11.26 - ErcanOPAK comment on HTML5: Fix a Custom Element’s Encapsulated Styles Leaking Into the Rest of the Page Because a style Tag Landed Outside Its Shadow Root

🧩 HTML5: Fix a Custom Element’s Encapsulated Styles Leaking Into the Rest of the Page Because a style Tag Landed Outside Its Shadow Root Attaching a shadow root to a custom element with attachShadow({ mode: ‘open’ }) is specifically what gives that element’s internal styles their encapsulation β€” any <style> tag placed inside the shadow […]

Read More
Windows

Windows 11: Fix a Laptop Waking Itself Repeatedly Overnight Because a Scheduled Task Has Wake the Computer Enabled Alongside Modern Standby

- 13.11.26 - ErcanOPAK comment on Windows 11: Fix a Laptop Waking Itself Repeatedly Overnight Because a Scheduled Task Has Wake the Computer Enabled Alongside Modern Standby

πŸͺŸ Windows 11: Fix a Laptop Waking Itself Repeatedly Overnight Because a Scheduled Task Has Wake the Computer Enabled Alongside Modern Standby Modern Standby keeps a laptop’s networking and a limited set of background activities alive even while the lid is closed and the screen is off, which is exactly the state that lets a […]

Read More
Git

Git: Fix a Merge Conflict Marker Getting Committed by Accident Because an Editor’s Auto-Save Ran Mid-Resolution

- 13.11.26 - ErcanOPAK comment on Git: Fix a Merge Conflict Marker Getting Committed by Accident Because an Editor’s Auto-Save Ran Mid-Resolution

πŸ”€ Git: Fix a Merge Conflict Marker Getting Committed by Accident Because an Editor’s Auto-Save Ran Mid-Resolution Git leaves the literal marker lines sitting in a file the moment a merge conflict happens, and it has no idea whether those lines are still unresolved or were deliberately left there, because as far as the filesystem […]

Read More
C#

C#: Fix a Tuple Deconstruction Silently Assigning to the Wrong Variable Because var Was Mixed With Already-Declared Variables in the Same Line

- 13.11.26 - ErcanOPAK comment on C#: Fix a Tuple Deconstruction Silently Assigning to the Wrong Variable Because var Was Mixed With Already-Declared Variables in the Same Line

πŸ”§ C#: Fix a Tuple Deconstruction Silently Assigning to the Wrong Variable Because var Was Mixed With Already-Declared Variables in the Same Line Tuple deconstruction lets you mix a fresh var-declared variable with an already-existing variable in the same deconstructing assignment β€” (var newOne, existingOne) = GetPair() β€” which is a deliberate, documented language feature, […]

Read More
SQL

SQL Server: Fix an ORDER BY on an Indexed Column Still Forcing a Sort Because a Join Changed the Row Order First

- 13.11.26 - ErcanOPAK comment on SQL Server: Fix an ORDER BY on an Indexed Column Still Forcing a Sort Because a Join Changed the Row Order First

πŸ—„οΈ SQL Server: Fix an ORDER BY on an Indexed Column Still Forcing a Sort Because a Join Changed the Row Order First An index on the exact column you’re ordering by only avoids a sort operation in the execution plan if the rows are still being read in that index’s order by the time […]

Read More
Ajax

Ajax: Fix navigator.sendBeacon Silently Dropping a Payload Over 64KB With No Error Reported on Page Unload

- 13.11.26 - ErcanOPAK comment on Ajax: Fix navigator.sendBeacon Silently Dropping a Payload Over 64KB With No Error Reported on Page Unload

πŸ”„ Ajax: Fix navigator.sendBeacon Silently Dropping a Payload Over 64KB With No Error Reported on Page Unload navigator.sendBeacon() exists specifically to send a final request during page unload without blocking navigation the way a synchronous XMLHttpRequest would, but it enforces a browser-enforced payload size limit (64KB in Chromium-based browsers) with no exception, no promise rejection, […]

Read More
Git

Git: Fix a Sparse-Checkout That Keeps Showing Files Outside Its Configured Patterns Because the Repository Was Cloned Before Sparse-Checkout Was Ever Turned On

- 13.11.26 - ErcanOPAK comment on Git: Fix a Sparse-Checkout That Keeps Showing Files Outside Its Configured Patterns Because the Repository Was Cloned Before Sparse-Checkout Was Ever Turned On

πŸ”€ Git: Fix a Sparse-Checkout That Keeps Showing Files Outside Its Configured Patterns Because the Repository Was Cloned Before Sparse-Checkout Was Ever Turned On Enabling sparse-checkout with git sparse-checkout init and then set tells Git which patterns should populate the working tree going forward, but it only prunes files out of a working tree that’s […]

Read More
C#

C#: Fix a Switch Expression Silently Taking the Wrong Branch Because Two Overlapping Patterns Are Tried in Source Order and the First Match Wins

- 13.11.26 - ErcanOPAK comment on C#: Fix a Switch Expression Silently Taking the Wrong Branch Because Two Overlapping Patterns Are Tried in Source Order and the First Match Wins

πŸ”§ C#: Fix a Switch Expression Silently Taking the Wrong Branch Because Two Overlapping Patterns Are Tried in Source Order and the First Match Wins A switch expression evaluates its arms strictly in the order they’re written and commits to the very first pattern that matches, with no attempt to find the most specific one […]

Read More
Photoshop

Photoshop: Fix the Content-Aware Move Tool Leaving a Faint Outline Around the Relocated Object Because Healing Mode Was Left on Strict

- 13.11.26 - ErcanOPAK comment on Photoshop: Fix the Content-Aware Move Tool Leaving a Faint Outline Around the Relocated Object Because Healing Mode Was Left on Strict

πŸ–ŒοΈ Photoshop: Fix the Content-Aware Move Tool Leaving a Faint Outline Around the Relocated Object Because Healing Mode Was Left on Strict The Content-Aware Move tool’s Structure and Color sliders only control how freely it’s allowed to invent texture when filling the hole left behind, but the separate Healing option in the tool’s options bar […]

Read More
AI

The AI Prompt That Converts a Legacy SQL Stored Procedure Into Testable Application Code Without Changing Its Behavior

- 13.11.26 - ErcanOPAK comment on The AI Prompt That Converts a Legacy SQL Stored Procedure Into Testable Application Code Without Changing Its Behavior

πŸ€– The AI Prompt That Converts a Legacy SQL Stored Procedure Into Testable Application Code Without Changing Its Behavior Stored procedures accumulate business logic that nobody wants to touch because nothing about them is unit-testable β€” the logic lives entirely inside the database, branches on parameters in ways that aren’t always obvious, and often has […]

Read More
Photoshop

Photoshop: Fix an Alpha Channel Selection Loading Inverted Because the Channel Was Built From a Layer Mask Instead of a Direct Selection

- 13.11.26 - ErcanOPAK comment on Photoshop: Fix an Alpha Channel Selection Loading Inverted Because the Channel Was Built From a Layer Mask Instead of a Direct Selection

πŸ–ŒοΈ Photoshop: Fix an Alpha Channel Selection Loading Inverted Because the Channel Was Built From a Layer Mask Instead of a Direct Selection Photoshop stores any selection as a grayscale alpha channel where white pixels are fully selected, black pixels are fully deselected, and every shade of gray in between is a partial selection β€” […]

Read More
JavaScript

JavaScript: Fix a ResizeObserver Callback Firing in an Infinite Loop Because It Resizes the Very Element It’s Observing

- 13.11.26 - ErcanOPAK comment on JavaScript: Fix a ResizeObserver Callback Firing in an Infinite Loop Because It Resizes the Very Element It’s Observing

⚑ JavaScript: Fix a ResizeObserver Callback Firing in an Infinite Loop Because It Resizes the Very Element It’s Observing ResizeObserver’s callback fires every time an observed element’s content box changes size, which is exactly what makes it useful for responsive components that need to react to their own container’s dimensions β€” and exactly what turns […]

Read More
C#

C#: Fix a Partial Method Call Silently Vanishing From the Compiled Output Because No Partial Declaration Ever Implemented It

- 13.11.26 - ErcanOPAK comment on C#: Fix a Partial Method Call Silently Vanishing From the Compiled Output Because No Partial Declaration Ever Implemented It

πŸ”§ C#: Fix a Partial Method Call Silently Vanishing From the Compiled Output Because No Partial Declaration Ever Implemented It A partial method declared without a return type and never given a matching implementing declaration anywhere in the partial class’s other files isn’t a compile error β€” the C# language specifically defines this as valid, […]

Read More
SQL

SQL Server: Fix a Filtered Index Never Getting Used Because the Query’s Predicate Compares Against a Parameter Instead of a Literal Value

- 13.11.26 - ErcanOPAK comment on SQL Server: Fix a Filtered Index Never Getting Used Because the Query’s Predicate Compares Against a Parameter Instead of a Literal Value

πŸ—„οΈ SQL Server: Fix a Filtered Index Never Getting Used Because the Query’s Predicate Compares Against a Parameter Instead of a Literal Value A filtered index only covers the subset of rows that satisfy its own filter predicate (WHERE IsActive = 1, say), and for SQL Server’s optimizer to safely use it for a query, […]

Read More
Kubernetes

Kubernetes: Fix a LoadBalancer Service Silently Reporting Every Client’s Request as Coming From the Same Node Because externalTrafficPolicy Was Left at Cluster

- 13.11.26 - ErcanOPAK comment on Kubernetes: Fix a LoadBalancer Service Silently Reporting Every Client’s Request as Coming From the Same Node Because externalTrafficPolicy Was Left at Cluster

☸️ Kubernetes: Fix a LoadBalancer Service Silently Reporting Every Client’s Request as Coming From the Same Node Because externalTrafficPolicy Was Left at Cluster A Service of type LoadBalancer with its externalTrafficPolicy left at the default value of Cluster routes incoming traffic to any healthy pod backing the service, anywhere in the cluster β€” which is […]

Read More
Visual Studio

Visual Studio: Fix a Breakpoint Never Hitting Because Just My Code Treats an Optimized Release DLL as Non-User Code

- 13.11.26 - ErcanOPAK comment on Visual Studio: Fix a Breakpoint Never Hitting Because Just My Code Treats an Optimized Release DLL as Non-User Code

πŸ› οΈ Visual Studio: Fix a Breakpoint Never Hitting Because Just My Code Treats an Optimized Release DLL as Non-User Code The debugger’s Just My Code option decides whether a stack frame counts as “yours” by checking whether the module was built with debug symbols and without optimizations enabled, not by checking which project the source […]

Read More
Asp.Net Core

Asp.Net Core: Fix a Blazor Server Circuit Losing All Component State After a Short Network Blip Because the Disconnected Circuit Retention Period Is Too Short for a Mobile Connection

- 13.11.26 - ErcanOPAK comment on Asp.Net Core: Fix a Blazor Server Circuit Losing All Component State After a Short Network Blip Because the Disconnected Circuit Retention Period Is Too Short for a Mobile Connection

βš™οΈ Asp.Net Core: Fix a Blazor Server Circuit Losing All Component State After a Short Network Blip Because the Disconnected Circuit Retention Period Is Too Short for a Mobile Connection A Blazor Server app keeps all of a user’s component state on the server, tied to a SignalR circuit, and relies on the browser reconnecting […]

Read More
November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (980)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (857)
  • How to select distinct rows in a datatable in C# (854)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (653)
  • Add Constraint to SQL Table to ensure email contains @ (609)
  • Average of all values in a column that are not zero in SQL (570)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (546)
  • Find numbers with more than two decimal places in SQL (475)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (980)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (857)
  • How to select distinct rows in a datatable in C# (854)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com