
Senior .NET Consultant | Legacy modernization, APIs, Azure & production reliability | Building practical AI systems | 15+ years shipping software
Kolkata
Joined September 2010
- Tweets75
- Following6
- Followers33
- Likes4
A SQL Server rollback cannot undo a payment processed by an external API.
Wrapping database changes in a transaction doesn't make the entire business workflow atomic.
That distinction matters when designing reliable .NET integrations.
#DotNet #SoftwareArchitecture
Not every business transaction ends in success or failure.
Sometimes, the outcome is unknown.
If your .NET application treats an uncertain outcome as a confirmed failure, it risks making incorrect business decisions.
Transaction state matters.
#DotNet #SoftwareArchitecture
4
An API timeout doesn't prove the operation failed.
The external service may have completed it before the response was lost.
Retrying without idempotency can turn a temporary network problem into a duplicate business transaction.
#DotNet #SoftwareArchitecture
5
SQL Server saved the order. The external API timed out.
Did the business transaction fail?
Not necessarily. The external system may have completed its operation before the timeout.
Without idempotency and recovery, retries can create duplicates.
#DotNet #SoftwareArchitecture
1
11
Rewriting a legacy .NET application doesn't automatically fix its security gaps.
If record-level authorization rules are unclear, those same vulnerabilities can survive the migration.
First establish who can access which data. Then enforce it consistently.
#DotNet #SoftwareArchitecture
13
A user can have the correct role and still access the wrong customer's record.
When WebForms, APIs and SQL enforce permissions differently, authorization gaps emerge.
I break down the failure pattern and safer remediation approach:
atribanerjee.com/blog/record…
#DotNet #ApplicationSecurity
11
Authorization checks scattered across WebForms pages, APIs, and stored procedures create a dangerous gap.
One access path may validate record ownership. Another may not.
The real risk isn't missing a check—it's inconsistent enforcement.
#DotNet #ApplicationSecurity
5
Hiding a menu item isn't authorization.
A user may never see the link, yet still access the underlying endpoint by changing a record ID.
In legacy .NET applications, security must be enforced where data is accessed—not just where navigation is displayed.
#DotNet #ApplicationSecurity
3
A valid login doesn't mean a user should access every record an endpoint can retrieve.
In legacy .NET systems, menus may enforce roles while pages, APIs and SQL queries apply inconsistent record-level permissions.
That's an authorization-boundary problem, not a UI problem.
#DotNet #ApplicationSecurity
3
Reducing database calls is only a performance win if the data stays correct.
After optimizing WebForms postbacks, test dependent dropdowns, updated reference data, and tenant boundaries.
Fewer queries + stale or incorrect results isn't an improvement.
#DotNet #SQLServer
6
A slow legacy .NET app doesn't always need faster SQL.
One postback can trigger repeated data binding and unnecessary database calls.
Before adding indexes or upgrading servers, trace the entire request.
Technical breakdown:
atribanerjee.com/blog/fast-s…
#DotNet #SQLServer
20
One dropdown selection in a legacy ASP.NET WebForms app can trigger more database work than expected.
A postback runs. Page lifecycle events execute. Controls bind data again.
Even unchanged reference data may be fetched repeatedly.
Before tuning SQL, inspect what each user interaction triggers.
𝗧𝗵𝗲 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 𝗺𝗮𝘆 𝗯𝗲 𝗿𝗲𝗽𝗲𝗮𝘁𝗲𝗱 𝘄𝗼𝗿𝗸, 𝗻𝗼𝘁 𝘀𝗹𝗼𝘄 𝗾𝘂𝗲𝗿𝗶𝗲𝘀.
#DotNet #SQLServer
3
Your SQL queries execute in milliseconds.
But users still wait several seconds for the page.
Why?
Because the application may execute the same queries repeatedly during a single request.
Optimizing one query won't solve excessive database round trips.
𝗠𝗲𝗮𝘀𝘂𝗿𝗲 𝘁𝗵𝗲 𝗲𝗻𝘁𝗶𝗿𝗲 𝗿𝗲𝗾𝘂𝗲𝘀𝘁, 𝗻𝗼𝘁 𝗷𝘂𝘀𝘁 𝘁𝗵𝗲 𝗦𝗤𝗟.
#DotNet #SQLServer
1
A legacy ASP.NET screen feels slow.
SQL Server isn't necessarily the bottleneck.
Sometimes each query is fast—but page loads, postbacks, and dependent controls execute them repeatedly.
Before adding indexes or rewriting the app, trace how many DB calls one user action actually triggers.
#DotNet #SQLServer
2
Two dashboards now show the same KPI total.
That doesn't prove the fix is correct.
Reconcile the underlying records: reversals, backdated changes, duplicates, and period boundaries.
A trustworthy report should explain *which records count and why*—not just display a matching number.
#SQLServer #DotNet
3
Two SQL Server reports disagree.
The instinct is to fix the queries until the totals match.
But matching numbers don't prove business correctness.
Trace the metric definition, source events, filters, and reporting dates first.
Technical breakdown:
atribanerjee.com/blog/when-s…
#SQLServer #DotNet
13
Two dashboards. Same SQL Server database. Different monthly revenue totals.
One uses the transaction date.
The other uses the posting date.
Now add backdated corrections and timezone boundaries.
Both queries may be technically correct, but they're measuring different things.
𝗕𝗲𝗳𝗼𝗿𝗲 𝗳𝗶𝘅𝗶𝗻𝗴 𝘁𝗵𝗲 𝗦𝗤𝗟, 𝗮𝗴𝗿𝗲𝗲 𝗼𝗻 𝘄𝗵𝗮𝘁 𝘁𝗵𝗲 𝗻𝘂𝗺𝗯𝗲𝗿 𝗿𝗲𝗽𝗿𝗲𝘀𝗲𝗻𝘁𝘀.
#SQLServer #DotNet
3
A SQL query can be 100% correct and still produce the wrong business answer.
Imagine a dashboard counting every order with Status = 'Completed'.
But the business defines completion as successful fulfillment.
The SQL isn't broken.
The definition behind it is.
𝗖𝗼𝗿𝗿𝗲𝗰𝘁 𝗰𝗼𝗱𝗲 ≠ 𝗰𝗼𝗿𝗿𝗲𝗰𝘁 𝗯𝘂𝘀𝗶𝗻𝗲𝘀𝘀 𝗺𝗲𝘁𝗿𝗶𝗰𝘀.
#SQLServer #DotNet
1
1
14
Two SQL Server reports show different totals for "Completed Orders."
Both queries run successfully.
One counts status changes. The other counts fulfillment events.
The real problem may not be SQL.
It's that nobody agreed what "Completed" means.
Fix the definition before the dashboard.
#SQLServer #DotNet #SoftwareArchitecture #ReportingModernization
6
A migration isn't complete when the new screens match the old ones.
For critical .NET workflows, test the actual business result: two tabs, stale pages, unauthorized IDs and concurrent updates.
The database must reflect the user's intended action—not hidden session state.
#DotNet #LegacyModernization