Dosi Bridge

Dosi Bridge Digital Operations & Software Innovation – Business Research Infrastructure for Development, Growth & Engineering

02/06/2026

ASP.NET Core upload endpoints need clear request body limits. In this Dosibridge tutorial, you will implement safe global Kestrel limits and explicit per-endpoint overrides for real production APIs.

Timestamps:
0:00 Dosibridge intro
0:03 Hook: oversized uploads
0:15 Why endpoint-specific limits matter
0:29 Core idea
0:40 Naive upload handler
0:53 Improved ASP.NET Core limits
1:10 Result and benefit
1:20 Follow Dosibridge

Follow Dosibridge for practical developer content.

This looks harmless in a .NET API until production traffic arrives: async work gets called, then blocked with `.Result` ...
01/06/2026

This looks harmless in a .NET API until production traffic arrives: async work gets called, then blocked with `.Result` or `.Wait()`. The API is not doing more work — it is slowly running out of available request threads.

Takeaways:
- Do not block on Task inside ASP.NET Core request paths.
- Keep async contracts visible through service layers.
- Pass CancellationToken to real outbound I/O.
- Debug high latency + low CPU as possible thread starvation.

What is the first thing you inspect when a .NET API slows down under load?

01/06/2026

C # ValueTask can remove avoidable Task allocations on hot async service paths — but only when the method often completes synchronously.
This Dosibridge tutorial refactors a cached lookup from Task to ValueTask with real production-safe code.

Timestamps:
0:00 Dosibridge intro
0:03 Hook: hot async allocations
0:13 Why it matters
0:25 Core idea
0:36 Naive Task version
0:50 ValueTask implementation
1:07 Safe call-site rule
1:18 Result and benefit
1:27 Follow Dosibridge

Follow Dosibridge for practical developer content.

Minimal APIs are great until Program.cs quietly becomes your new God class.Here is the production-friendly shape I prefe...
01/06/2026

Minimal APIs are great until Program.cs quietly becomes your new God class.

Here is the production-friendly shape I prefer for ASP.NET Core APIs:

1. Typed Results for honest response contracts
2. Endpoint Filters for reusable request rules
3. FluentValidation for declarative validation
4. Handlers/services for real use cases
5. ProblemDetails for consistent error payloads
6. OpenAPI metadata that generated clients can trust

The carousel walks through a Create Order endpoint with code examples and shows where validation, DI, EF Core, cancellation, and error contracts should live.

My rule of thumb:
Minimal APIs should be thin HTTP adapters, not a place to hide all business logic.

What pattern do you use to keep Minimal APIs clean as the project grows?

I have seen teams scale APIs while one expensive endpoint keeps drowning the database. More app instances did not fix th...
01/06/2026

I have seen teams scale APIs while one expensive endpoint keeps drowning the database. More app instances did not fix the pressure; they helped create more concurrent work.

My practical rule: rate limiting is not only anti-abuse. It is backpressure for scarce work.

A good production limit is specific: which endpoint, which user or tenant, what rejection shape, and what metric tells you it is happening.

For ASP.NET Core APIs, a clear 429 with logging is often better than letting callers wait until SQL, CPU, or threads are exhausted.

Which endpoints do you rate-limit first: login, search, exports, or tenant-level writes?

I’ve seen candidates describe Span as “a faster array.” That’s close, but it misses the important rule.Simple rule: use ...
01/06/2026

I’ve seen candidates describe Span as “a faster array.” That’s close, but it misses the important rule.

Simple rule: use Span / ReadOnlySpan when you need a temporary view over existing memory — usually in parsing or slicing code where allocations matter.

Tiny example:
```csharp
ReadOnlySpan prefix = input.AsSpan(0, 3);

if (prefix.SequenceEqual("ERR"))
{
RouteError(input);
}
```

The practical warning: Span is stack-only. You can’t put it in a normal class field, capture it freely, or carry it across await. That limitation is annoying, but it’s also what keeps it safe.

My opinion: I wouldn’t reach for Span in ordinary CRUD code. It shines in hot parsing paths and low-allocation libraries, not everywhere.

Where have you actually used Span in a real .NET project?

A common .NET interview answer gets dangerous when it reaches an ASP.NET Core API: `lock` protects shared state, but it ...
31/05/2026

A common .NET interview answer gets dangerous when it reaches an ASP.NET Core API: `lock` protects shared state, but it is not async-friendly.

A few practical takeaways:
- Do not turn async work into `.Wait()` or `.Result()` inside a lock.
- Use `SemaphoreSlim.WaitAsync(ct)` when the wait itself must be asynchronous and cancellable.
- Keep critical sections small; do not serialize the whole API because one entity needs coordination.
- If the work is slow or durable, move it to a queue instead of holding a request hostage.

Where do you draw the line between protecting shared state and moving work to a background queue?

31/05/2026

Stop buffering every page from partner APIs before returning data.
This Dosibridge tutorial shows a practical C # IAsyncEnumerable refactor for streaming paged API results with cancellation and early exit.

Timestamps:
0:00 Dosibridge intro
0:03 Hook: stop buffering pages
0:14 Why it matters
0:24 Core idea
0:34 Naive buffered client
0:45 Improved async stream
0:58 await foreach call site
1:11 Result and benefit
1:21 Follow Dosibridge

Follow Dosibridge for practical developer content.

I have seen APIs look perfectly healthy from the outside while every request is quietly waiting for a database connectio...
31/05/2026

I have seen APIs look perfectly healthy from the outside while every request is quietly waiting for a database connection.

The common mistake is to scale app containers first. Sometimes that only creates more pressure on the same SQL connection pool.

My practical debugging order: check where requests wait, keep EF Core query scopes short, pass cancellation tokens, and make timeouts honest. Pool size should come from load tests, not guesses.

When your API slows down, do you check SQL pool wait time before scaling app instances?

I’ve seen candidates write string comparisons that work in tests, then get weird at API boundaries.Simple rule: if the c...
26/05/2026

I’ve seen candidates write string comparisons that work in tests, then get weird at API boundaries.

Simple rule: if the comparison is technical data like role names, IDs, headers, or email domains, say exactly what comparison you want.

Tiny example:

```csharp
if (role.Equals("admin",
StringComparison.OrdinalIgnoreCase))
{
AllowAccess();
}
```

A common mistake is using ToLower() on both sides. It reads simple, but it allocates and hides the real decision: culture-sensitive or ordinal comparison?

My opinion: OrdinalIgnoreCase is usually the boring, correct default for protocol-ish strings. For user-facing language, slow down and think about culture.

Where do you explicitly use StringComparison in your .NET codebase?

Address

Dhaka
1207

Alerts

Be the first to know and let us send you an email when Dosi Bridge posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share