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

Tag: BackendDev

Docker

Docker Containers Randomly Exit on Windows

- 22.01.26 | 15.02.26 - ErcanOPAK comment on Docker Containers Randomly Exit on Windows

The Mystery: Your Docker image builds perfectly on Linux or CI/CD, but the moment you or a teammate tries to run it on Windows, the container exits instantly with a cryptic exec format error or standard_init_linux.go:211: exec user process caused “no such file or directory”. The Culprit: It’s not your code; it’s the invisible characters […]

Read More
Asp.Net Core / C#

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

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

The Trap: Most developers dutifully add a Rate Limiter to their API to prevent abuse. However, they often make a critical mistake: they set a Global Limit. If you set a limit of “1000 requests per minute” globally, a single malicious bot can use up all 1000 requests in 5 seconds. The result? Your legitimate […]

Read More
SQL

How to enable, disable and check if Service Broker is enabled on a database in SQL Server

- 14.01.22 | 24.03.26 - ErcanOPAK comment on How to enable, disable and check if Service Broker is enabled on a database in SQL Server

The Context: SQL Server Service Broker is a powerful framework for building highly scalable, asynchronous database applications. Whether you are using Query Notifications, External Activations, or Distributed Messaging, knowing how to properly manage the Broker state is essential for any DBA or Backend Developer. The Challenge: Simply running an ALTER DATABASE command often hangs indefinitely […]

Read More
C#

How to select distinct rows in a datatable in C#

- 10.03.20 | 24.03.26 - ErcanOPAK comment on How to select distinct rows in a datatable in C#

The Scenario: You’ve loaded a massive DataTable from an Excel file, a CSV, or a legacy database. Now you realize it contains duplicate entries, and you need a unique list based on one or more columns—without writing complex foreach loops or heavy LINQ queries. The Pro Solution: The built-in DefaultView.ToTable() method is the most efficient […]

Read More
SQL

Get the User Name and Domain Name from an Email Address in SQL

- 11.06.18 | 15.07.26 - ErcanOPAK comment on Get the User Name and Domain Name from an Email Address in SQL

The Challenge: You have a Users table with thousands of email addresses, and you need to generate a report that separates the Username from the Domain Name. Doing this manually is impossible, and using complex RegEx in SQL can be overkill. The Solution: By combining three core SQL functions—SUBSTRING, CHARINDEX, and LEN—you can perform surgical […]

Read More
SQL

Get the First and Last Word from a String or Sentence in SQL

- 11.06.18 | 24.03.26 - ErcanOPAK 2 Comments on Get the First and Last Word from a String or Sentence in SQL

The Challenge: You have a column of full names, product titles, or long descriptions, and you need to grab just the first and last words. Since SQL doesn’t have a native Split() function that returns an array easily, we have to get creative with string positioning. The Solution: We use a combination of CHARINDEX, SUBSTRING, […]

Read More
SQL

Add Constraint to SQL Table to ensure email contains @

- 11.06.18 | 24.03.26 - ErcanOPAK comment on Add Constraint to SQL Table to ensure email contains @

The Strategy: Never trust your data source blindly. While frontend validation is great for UX, Database Constraints are your last line of defense. By adding a CHECK CONSTRAINT, you ensure that no invalid email address ever touches your storage, whether it comes from an API, a bulk import, or a manual script. The Goal: To […]

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 (981)
  • 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 (858)
  • 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 (547)
  • 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 (981)
  • 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 (858)
  • 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