Skip to content

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

Day: December 7, 2025

Visual Studio

Visual Studio “IntelliSense Slow” — Fix the Hidden Roslyn Cache Issue

- 07.12.25 - ErcanOPAK comment on Visual Studio “IntelliSense Slow” — Fix the Hidden Roslyn Cache Issue

If IntelliSense lags, it’s usually Roslyn’s temp files. ✔ Fix Delete: %LOCALAPPDATA%\Microsoft\VisualStudio\*\ComponentModelCache Restart VS → Instant improvement. 💡 Bonus Disable unused analyzers for huge solutions.

Read More
Wordpress

WordPress “White Screen of Death” — The Real Fix Nobody Mentions

- 07.12.25 - ErcanOPAK comment on WordPress “White Screen of Death” — The Real Fix Nobody Mentions

The WSOD usually comes from PHP memory limit — not plugins. ✔ Fix Add to wp-config.php: define(‘WP_MEMORY_LIMIT’, ‘256M’); Default is often 40M → insufficent. 💡 Bonus Enable debug without exposing logs publicly: define(‘WP_DEBUG’, true); define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’, false);  

Read More
Windows

Windows 11 “File Explorer Slow” — The Thumbnail Cache Killer

- 07.12.25 - ErcanOPAK comment on Windows 11 “File Explorer Slow” — The Thumbnail Cache Killer

Explorer becomes slow when thumbnail cache is corrupted. ✔ Fix: ie4uinit.exe -ClearIconCache del /f /q %localappdata%\Microsoft\Windows\Explorer\thumbcache*.db Restart Explorer. Instant speed boost.

Read More
Windows

Windows 11 “Network Freezes” — Fix the Hidden Power Throttling Issue

- 07.12.25 - ErcanOPAK comment on Windows 11 “Network Freezes” — Fix the Hidden Power Throttling Issue

When Windows aggressively throttles network power, WiFi drops happen. ✔ Fix Disable power throttling: Settings → System → Power → Turn off “Power Throttling”Also run: powercfg -setacvalueindex SCHEME_CURRENT SUB_PROCESSOR PROCTHROTTLEMAX 100 💡 Massive stability boost.

Read More
Ajax / JavaScript

AJAX Cache Nightmare — Why Your GET Requests Don’t Update

- 07.12.25 - ErcanOPAK comment on AJAX Cache Nightmare — Why Your GET Requests Don’t Update

Browsers cache GET requests aggressively. ✔ Life-Saving Fix $.ajax({ url: ‘/api/data’, cache: false }); Under the hood, jQuery adds:?_={timestamp} → bypasses cache. 💡 If using fetch: fetch(‘/api/data’, { cache: ‘no-store’ });  

Read More
JavaScript

JS “Debounce vs Throttle” — Why Your Search Bar Lags

- 07.12.25 - ErcanOPAK comment on JS “Debounce vs Throttle” — Why Your Search Bar Lags

Real problem:Search inputs trigger too many backend calls. ✔ Debounce (use for search) function debounce(fn, delay){ let timeout; return (…args)=>{ clearTimeout(timeout); timeout = setTimeout(()=>fn(…args), delay); }; } ✔ Throttle (use for scroll/resize) function throttle(fn, delay){ let last = 0; return (…args)=>{ const now = Date.now(); if(now – last >= delay){ last = now; fn(…args); } […]

Read More
HTML

HTML5 “Inputmode” — The Feature That Makes Mobile Forms 10× Better

- 07.12.25 - ErcanOPAK comment on HTML5 “Inputmode” — The Feature That Makes Mobile Forms 10× Better

Most devs don’t know this exists. ✔ Example <input type=”text” inputmode=”numeric” /> This forces numeric keyboard on mobile — even though type is text. Also supports: decimal email search tel url 💡 Immediate UX win.

Read More
CSS

CSS Flexbox Gap Not Working? — The Hidden Flex Wrapping Trap

- 07.12.25 - ErcanOPAK comment on CSS Flexbox Gap Not Working? — The Hidden Flex Wrapping Trap

gap: only works when flex items wrap correctly. ❌ Wrong .container { display: flex; gap: 20px; flex-wrap: nowrap; } ✔ Correct .container { display: flex; flex-wrap: wrap; gap: 20px; } 💡 Hidden Detail Safari had partial support — updating fixes 90% layout bugs.

Read More
Asp.Net Core / C#

Rate Limiting in .NET — Fix ‘Random 429 Errors’ the Right Way

- 07.12.25 - ErcanOPAK comment on Rate Limiting in .NET — Fix ‘Random 429 Errors’ the Right Way

Most devs add a rate limiter but forget partitioning. ✔ Correct Approach app.UseRateLimiter(new() { GlobalLimiter = PartitionedRateLimiter.CreateIpPolicy( fixedWindow: 100, window: TimeSpan.FromMinutes(1) ) }); This prevents users from throttling each other.

Read More
Asp.Net Core / C#

ASP.NET Core “ValidateOnStart” — Stop Production Crashes at Runtime

- 07.12.25 - ErcanOPAK comment on ASP.NET Core “ValidateOnStart” — Stop Production Crashes at Runtime

One of the least known but most powerful features. ✔ Use: builder.Services.AddOptions<MySettings>() .Bind(configuration.GetSection(“MySettings”)) .ValidateDataAnnotations() .ValidateOnStart(); Now, invalid configs fail at startup, not during production traffic. 💡 Saves Hours Prevents: null reference crashes broken API keys missing secrets

Read More
SQL

SQL Deadlocks — The 3-Lock Pattern That Solves 90% Cases

- 07.12.25 - ErcanOPAK comment on SQL Deadlocks — The 3-Lock Pattern That Solves 90% Cases

Deadlocks happen when queries lock different resources in different orders. ✔ The Fix Always lock tables in the same sequence. Example: BEGIN TRAN SELECT … FROM Users WITH (UPDLOCK) SELECT … FROM Orders WITH (UPDLOCK) COMMIT If every stored procedure follows this sequence →deadlocks drop to near zero.

Read More
SQL

SQL “Slow LIKE Query” — The Real Fix (Not Indexes!)

- 07.12.25 - ErcanOPAK comment on SQL “Slow LIKE Query” — The Real Fix (Not Indexes!)

LIKE ‘%abc%’ is un-indexable — always full scan. ✔ Rarely Known Fix Use a computed column + index: ALTER TABLE Products ADD NameIndex AS LOWER(Name); CREATE INDEX IX_Products_NameIndex ON Products(NameIndex); Query: WHERE NameIndex LIKE ‘%abc%’ 💡 Result Massive speed boost without full scans.

Read More
C#

C# “Enum Flags” — The Powerful Feature 90% Underuse

- 07.12.25 - ErcanOPAK comment on C# “Enum Flags” — The Powerful Feature 90% Underuse

Developers often create multiple boolean columns instead of using bitwise enums. ✔ Correct Pattern [Flags] public enum Permissions { None = 0, Read = 1, Write = 2, Admin = 4 } Check: if (user.Permissions.HasFlag(Permissions.Admin)) { … } 💡 Benefit Reduces: table columns complexity storage condition checks

Read More
C#

C# Memory Leaks in LINQ — Why Your App Keeps Eating RAM

- 07.12.25 - ErcanOPAK comment on C# Memory Leaks in LINQ — Why Your App Keeps Eating RAM

LINQ is beautiful but dangerous. ⚠ Root Cause Deferred execution + large collections = hidden leaks. Example: var result = bigList.Where(x => x.IsActive); This doesn’t execute yet — the original list must stay alive. ✔ Fix Materialize immediately: var result = bigList.Where(x => x.IsActive).ToList(); 💡 Life-Saving Detection Tip If RAM grows when iterating lists →you […]

Read More
C#

C# “ConfigureAwait(false)” — The Most Misunderstood Performance Trick

- 07.12.25 - ErcanOPAK comment on C# “ConfigureAwait(false)” — The Most Misunderstood Performance Trick

Most devs know ConfigureAwait(false)…But few actually know when to use it — or how much performance it saves. ⚠ Problem Default awaits try to resume on the captured context (UI thread / ASP.NET request context).This slows down: high-load async APIs microservices background tasks ✔ Real Fix Use ConfigureAwait(false) in library code, background workers, hosted services: […]

Read More
December 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Nov   Jan »

Most Viewed Posts

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

Recent Posts

  • C# Value Types Copied More Than You Think
  • C# Async Void Is Dangerous
  • C# Foreach vs For Performance Difference
  • SQL Deletes Lock Tables
  • SQL Queries Slow Despite Indexes
  • .NET Core APIs Feel Slow Under Load
  • ASP.NET Core Memory Grows Slowly
  • Git Conflicts Keep Reappearing
  • Git Rebase Feels Dangerous
  • Ajax Forms Submit Twice

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (923)
  • How to add default value for Entity Framework migrations for DateTime and Bool (814)
  • Get the First and Last Word from a String or Sentence in SQL (808)
  • How to select distinct rows in a datatable in C# (784)
  • How to make theater mode the default for Youtube (664)

Recent Posts

  • C# Value Types Copied More Than You Think
  • C# Async Void Is Dangerous
  • C# Foreach vs For Performance Difference
  • SQL Deletes Lock Tables
  • SQL Queries Slow Despite Indexes

Social

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