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 7, 2026

AI

The AI Prompt That Audits Your REST API’s Error Responses for Leaking Stack Traces or Internal Exception Details

- 07.11.26 - ErcanOPAK comment on The AI Prompt That Audits Your REST API’s Error Responses for Leaking Stack Traces or Internal Exception Details

πŸ€– The AI Prompt That Audits Your REST API’s Error Responses for Leaking Stack Traces or Internal Exception Details Default error handling in most web frameworks is generous with detail in development and easy to forget to lock down for production β€” a stack trace, a database connection string fragment, an internal file path, or […]

Read More
Wordpress

WordPress: Fix the Block Editor Silently Dropping a Custom CSS Class on Save Because a Plugin’s Content Filter Strips Attributes It Doesn’t Recognize

- 07.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Silently Dropping a Custom CSS Class on Save Because a Plugin’s Content Filter Strips Attributes It Doesn’t Recognize

πŸ“ WordPress: Fix the Block Editor Silently Dropping a Custom CSS Class on Save Because a Plugin’s Content Filter Strips Attributes It Doesn’t Recognize Adding a custom CSS class to a block through the Advanced panel stores it as part of that block’s HTML attributes inside post_content, but many security and SEO plugins run saved […]

Read More
CSS

CSS: Fix a position: sticky Element’s Offset Jumping on Every Scroll Because a Parent Element Has transform Set to Anything Other Than none

- 07.11.26 - ErcanOPAK comment on CSS: Fix a position: sticky Element’s Offset Jumping on Every Scroll Because a Parent Element Has transform Set to Anything Other Than none

🎨 CSS: Fix a position: sticky Element’s Offset Jumping on Every Scroll Because a Parent Element Has transform Set to Anything Other Than none position: sticky calculates its stuck offset relative to its nearest scrolling ancestor, but crucially also relative to whichever ancestor establishes a new containing block for it β€” and setting transform to […]

Read More
Asp.Net Core

ASP.NET Core: Fix SignalR Clients Silently Disconnecting Every Few Minutes Because a Reverse Proxy’s Idle Timeout Is Shorter Than the Hub’s Keep-Alive Interval

- 07.11.26 - ErcanOPAK comment on ASP.NET Core: Fix SignalR Clients Silently Disconnecting Every Few Minutes Because a Reverse Proxy’s Idle Timeout Is Shorter Than the Hub’s Keep-Alive Interval

βš™οΈ ASP.NET Core: Fix SignalR Clients Silently Disconnecting Every Few Minutes Because a Reverse Proxy’s Idle Timeout Is Shorter Than the Hub’s Keep-Alive Interval SignalR keeps a persistent connection alive by sending periodic keep-alive pings at an interval configured on the Hub, relying on the assumption that anything sitting between the client and server will […]

Read More
Docker

Docker: Fix a .dockerignore File Having No Effect on a COPY Instruction Because It Was Placed in the Wrong Directory Relative to the Build Context

- 07.11.26 - ErcanOPAK comment on Docker: Fix a .dockerignore File Having No Effect on a COPY Instruction Because It Was Placed in the Wrong Directory Relative to the Build Context

🐳 Docker: Fix a .dockerignore File Having No Effect on a COPY Instruction Because It Was Placed in the Wrong Directory Relative to the Build Context Docker resolves a .dockerignore file relative to the build context root β€” the directory path you pass as the final argument to docker build β€” not relative to the […]

Read More
Git

Git: Fix git bisect Jumping Straight to a Verdict Without Testing Any Intermediate Commit Because the Range Only Contained Two Commits

- 07.11.26 - ErcanOPAK comment on Git: Fix git bisect Jumping Straight to a Verdict Without Testing Any Intermediate Commit Because the Range Only Contained Two Commits

πŸ”€ Git: Fix git bisect Jumping Straight to a Verdict Without Testing Any Intermediate Commit Because the Range Only Contained Two Commits git bisect works by binary-searching the commit range you give it, checking out the midpoint and asking you to mark it good or bad β€” but when the range you started with contains […]

Read More
C#

C#: Fix String.Format Throwing a FormatException Only in Production Because a Composite Format String Contained a Literal Curly Brace That Wasn’t Doubled

- 07.11.26 - ErcanOPAK comment on C#: Fix String.Format Throwing a FormatException Only in Production Because a Composite Format String Contained a Literal Curly Brace That Wasn’t Doubled

πŸ”§ C#: Fix String.Format Throwing a FormatException Only in Production Because a Composite Format String Contained a Literal Curly Brace That Wasn’t Doubled A composite format string passed to String.Format treats every curly brace as the start or end of a format item placeholder, so a literal brace meant to appear in the output has […]

Read More
JavaScript

JavaScript: Fix Promise.race Resolving With a Timeout’s Placeholder Value Instead of Ever Propagating the Slower Promise’s Eventual Rejection

- 07.11.26 - ErcanOPAK comment on JavaScript: Fix Promise.race Resolving With a Timeout’s Placeholder Value Instead of Ever Propagating the Slower Promise’s Eventual Rejection

⚑ JavaScript: Fix Promise.race Resolving With a Timeout’s Placeholder Value Instead of Ever Propagating the Slower Promise’s Eventual Rejection A common pattern for adding a timeout to a slow async call races the real operation against a promise that resolves with a sentinel value after a fixed delay, using Promise.race to take whichever settles first. […]

Read More
SQL

SQL Server: Fix a FORCESEEK Query Hint Causing New Deadlocks Because It Forces a Narrow Row Lock Instead of the Page Lock the Optimizer Would Have Chosen on Its Own

- 07.11.26 - ErcanOPAK comment on SQL Server: Fix a FORCESEEK Query Hint Causing New Deadlocks Because It Forces a Narrow Row Lock Instead of the Page Lock the Optimizer Would Have Chosen on Its Own

πŸ—„οΈ SQL Server: Fix a FORCESEEK Query Hint Causing New Deadlocks Because It Forces a Narrow Row Lock Instead of the Page Lock the Optimizer Would Have Chosen on Its Own The FORCESEEK query hint tells the optimizer to use an index seek instead of a scan regardless of its own cost-based judgment, which is […]

Read More
C#

C#: Fix an IAsyncEnumerable foreach Loop Silently Ignoring a CancellationToken Because WithCancellation Was Never Called

- 07.11.26 - ErcanOPAK comment on C#: Fix an IAsyncEnumerable foreach Loop Silently Ignoring a CancellationToken Because WithCancellation Was Never Called

πŸ”§ C#: Fix an IAsyncEnumerable foreach Loop Silently Ignoring a CancellationToken Because WithCancellation Was Never Called An async iterator method that accepts a CancellationToken parameter and checks it internally with ThrowIfCancellationRequested will only actually see cancellation requests that are routed to it, and a plain await foreach loop over an IAsyncEnumerable<T> doesn’t pass any token […]

Read More
Windows

Windows 11: Fix a USB-C Dock’s Ethernet Port Capping at 100 Mbps Instead of Gigabit Because Windows Installed a Generic Driver Over the Dock Vendor’s

- 07.11.26 - ErcanOPAK comment on Windows 11: Fix a USB-C Dock’s Ethernet Port Capping at 100 Mbps Instead of Gigabit Because Windows Installed a Generic Driver Over the Dock Vendor’s

πŸͺŸ Windows 11: Fix a USB-C Dock’s Ethernet Port Capping at 100 Mbps Instead of Gigabit Because Windows Installed a Generic Driver Over the Dock Vendor’s A USB-C dock’s built-in Gigabit Ethernet port depends on Windows loading the correct vendor-specific driver for whichever USB-to-Ethernet chipset the dock actually uses β€” Realtek, ASIX, and a handful […]

Read More
C#

C#: Fix a Record’s with Expression Silently Skipping a Custom Validation Check Because It Bypasses the Constructor Entirely

- 07.11.26 - ErcanOPAK comment on C#: Fix a Record’s with Expression Silently Skipping a Custom Validation Check Because It Bypasses the Constructor Entirely

πŸ”§ C#: Fix a Record’s with Expression Silently Skipping a Custom Validation Check Because It Bypasses the Constructor Entirely A record’s primary constructor is the natural place to put validation logic that should run every time an instance is created, and it does run correctly for every ordinary new MyRecord(…) call β€” but the compiler-generated […]

Read More
Kubernetes

Kubernetes: Fix a PodDisruptionBudget Blocking a Node Drain Forever Because minAvailable Equals the Deployment’s Total Replica Count

- 07.11.26 - ErcanOPAK comment on Kubernetes: Fix a PodDisruptionBudget Blocking a Node Drain Forever Because minAvailable Equals the Deployment’s Total Replica Count

☸️ Kubernetes: Fix a PodDisruptionBudget Blocking a Node Drain Forever Because minAvailable Equals the Deployment’s Total Replica Count A PodDisruptionBudget protects a Deployment from losing too many replicas at once during voluntary disruptions like a node drain, by guaranteeing a minimum number of pods stay available throughout the eviction. If minAvailable is set equal to […]

Read More
Asp.Net Core

ASP.NET Core: Fix Two appsettings.{Environment}.json Files Both Seeming to Apply Because ASPNETCORE_ENVIRONMENT Was Set in launchSettings.json but Never Set on the Deployed Server

- 07.11.26 - ErcanOPAK comment on ASP.NET Core: Fix Two appsettings.{Environment}.json Files Both Seeming to Apply Because ASPNETCORE_ENVIRONMENT Was Set in launchSettings.json but Never Set on the Deployed Server

βš™οΈ ASP.NET Core: Fix Two appsettings.{Environment}.json Files Both Seeming to Apply Because ASPNETCORE_ENVIRONMENT Was Set in launchSettings.json but Never Set on the Deployed Server ASP.NET Core decides which environment-specific settings file to layer on top of appsettings.json by reading the ASPNETCORE_ENVIRONMENT environment variable at host startup, and Visual Studio’s own launchSettings.json conveniently sets that variable […]

Read More
Wordpress

WordPress: Fix a Scheduled Post Silently Reverting to Draft Because an Older Autosave From a Second Open Browser Tab Overwrote the Newer One

- 07.11.26 - ErcanOPAK comment on WordPress: Fix a Scheduled Post Silently Reverting to Draft Because an Older Autosave From a Second Open Browser Tab Overwrote the Newer One

πŸ“ WordPress: Fix a Scheduled Post Silently Reverting to Draft Because an Older Autosave From a Second Open Browser Tab Overwrote the Newer One The WordPress block editor autosaves a local revision of a post every short interval while it’s open, and if the same post is also left open and forgotten in an earlier […]

Read More
Photoshop

Photoshop: Fix Content-Aware Fill Leaving a Faint Seam Along the Selection Edge Because the Sampling Area Included a Visually Similar but Differently Lit Nearby Region

- 07.11.26 - ErcanOPAK comment on Photoshop: Fix Content-Aware Fill Leaving a Faint Seam Along the Selection Edge Because the Sampling Area Included a Visually Similar but Differently Lit Nearby Region

πŸ–ŒοΈ Photoshop: Fix Content-Aware Fill Leaving a Faint Seam Along the Selection Edge Because the Sampling Area Included a Visually Similar but Differently Lit Nearby Region Content-Aware Fill analyzes a sampling area around your selection to synthesize replacement pixels, and by default that area is the entire image minus the selection unless you restrict it […]

Read More
AI

The AI Prompt That Checks a Pull Request’s New Dependencies for Known Vulnerabilities and License Conflicts Before You Merge

- 07.11.26 - ErcanOPAK comment on The AI Prompt That Checks a Pull Request’s New Dependencies for Known Vulnerabilities and License Conflicts Before You Merge

πŸ€– The AI Prompt That Checks a Pull Request’s New Dependencies for Known Vulnerabilities and License Conflicts Before You Merge A pull request that adds or bumps a package dependency rarely gets the same scrutiny as the application code sitting next to it, yet a single transitive dependency can introduce a known CVE or swap […]

Read More
Git

Git: Fix a Rebased Branch Pushing Clean Locally but Showing Duplicate Commits on GitHub Because the Remote Still Held the Pre-Rebase History

- 07.11.26 - ErcanOPAK comment on Git: Fix a Rebased Branch Pushing Clean Locally but Showing Duplicate Commits on GitHub Because the Remote Still Held the Pre-Rebase History

πŸ”€ Git: Fix a Rebased Branch Pushing Clean Locally but Showing Duplicate Commits on GitHub Because the Remote Still Held the Pre-Rebase History Rebasing a branch rewrites its commits with new hashes, and a plain git push afterward will simply be rejected as a non-fast-forward update, since the rewritten history no longer shares a common […]

Read More
Photoshop

Photoshop: Fix Type on a Path Suddenly Flowing in the Wrong Direction After the Path Is Transformed With Free Transform

- 07.11.26 - ErcanOPAK comment on Photoshop: Fix Type on a Path Suddenly Flowing in the Wrong Direction After the Path Is Transformed With Free Transform

πŸ–ŒοΈ Photoshop: Fix Type on a Path Suddenly Flowing in the Wrong Direction After the Path Is Transformed With Free Transform Text bound to a path with the Type tool flows in the direction the path’s anchor points were originally drawn in β€” from the first anchor toward the last. Free Transform scales, rotates, or […]

Read More
Ajax

Ajax: Fix a fetch() Request’s AbortController Signal Not Actually Cancelling the Underlying Network Call Because the Server Never Checks the Connection Until It Starts Writing a Response

- 07.11.26 - ErcanOPAK comment on Ajax: Fix a fetch() Request’s AbortController Signal Not Actually Cancelling the Underlying Network Call Because the Server Never Checks the Connection Until It Starts Writing a Response

πŸ”„ Ajax: Fix a fetch() Request’s AbortController Signal Not Actually Cancelling the Underlying Network Call Because the Server Never Checks the Connection Until It Starts Writing a Response Calling abort() on an AbortController tied to a fetch request reliably stops the browser from processing or exposing the response on the client side, but it doesn’t […]

Read More
Visual Studio

Visual Studio: Fix the Exception Settings Window’s Break-When-Thrown Checkbox Not Actually Stopping the Debugger Because the Exception Is Already Handled Further Up the Call Stack

- 07.11.26 - ErcanOPAK comment on Visual Studio: Fix the Exception Settings Window’s Break-When-Thrown Checkbox Not Actually Stopping the Debugger Because the Exception Is Already Handled Further Up the Call Stack

πŸ› οΈ Visual Studio: Fix the Exception Settings Window’s Break-When-Thrown Checkbox Not Actually Stopping the Debugger Because the Exception Is Already Handled Further Up the Call Stack Checking β€œBreak When Thrown” for an exception type in the Exceptions window (Ctrl+Alt+E) is supposed to stop the debugger the instant that exception is raised anywhere, even inside a […]

Read More
AI

The AI Prompt That Reads Your Phone’s Screen Time Report and Tells You Which Three Apps to Cut First for the Biggest Impact

- 07.11.26 - ErcanOPAK comment on The AI Prompt That Reads Your Phone’s Screen Time Report and Tells You Which Three Apps to Cut First for the Biggest Impact

πŸ€– The AI Prompt That Reads Your Phone’s Screen Time Report and Tells You Which Three Apps to Cut First for the Biggest Impact Both iOS and Android generate a detailed weekly screen time breakdown by app and category, but the report on its own is just a wall of numbers β€” it tells you […]

Read More
Windows

Windows 11: Fix a Wireless Mouse Stuttering Every Few Seconds Because Windows Put Its USB Root Hub to Sleep to Save Power

- 07.11.26 - ErcanOPAK comment on Windows 11: Fix a Wireless Mouse Stuttering Every Few Seconds Because Windows Put Its USB Root Hub to Sleep to Save Power

πŸͺŸ Windows 11: Fix a Wireless Mouse Stuttering Every Few Seconds Because Windows Put Its USB Root Hub to Sleep to Save Power Windows’ USB selective suspend power-management feature can put an idle USB root hub into a low-power state to save energy, and the hub governing a wireless mouse’s USB receiver is no exception […]

Read More
SQL

SQL Server: Fix a Stored Procedure’s Table-Valued Parameter Silently Ignoring a Newly Added Column Because the Calling Code’s DataTable Schema Was Never Updated to Match

- 07.11.26 - ErcanOPAK comment on SQL Server: Fix a Stored Procedure’s Table-Valued Parameter Silently Ignoring a Newly Added Column Because the Calling Code’s DataTable Schema Was Never Updated to Match

πŸ—„οΈ SQL Server: Fix a Stored Procedure’s Table-Valued Parameter Silently Ignoring a Newly Added Column Because the Calling Code’s DataTable Schema Was Never Updated to Match A table-valued parameter binds a client-side DataTable to a user-defined table type by column position and type, not by matching column names against whatever the stored procedure’s logic expects […]

Read More
HTML

HTML5: Fix a Native input type=’date’ Field Showing the Wrong Date by One Day Because the Value Was Parsed as UTC Then Displayed in Local Time

- 07.11.26 - ErcanOPAK comment on HTML5: Fix a Native input type=’date’ Field Showing the Wrong Date by One Day Because the Value Was Parsed as UTC Then Displayed in Local Time

🧩 HTML5: Fix a Native input type=’date’ Field Showing the Wrong Date by One Day Because the Value Was Parsed as UTC Then Displayed in Local Time A native input type=β€œdate” element always stores and displays its value in the format YYYY-MM-DD with no time or time-zone component at all β€” it’s intentionally timezone-less. The […]

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