@Taylorkdev Exactly. That's one of the most important failure scenarios to test.
I'd also verify that retrying the same request doesn't create a second payment, and that reconciliation can recover the correct transaction state without manual intervention.
Reliable integrations aren't defined by successful API calls.
They're defined by how safely they recover when SQL Server and external services disagree.
My latest article covers idempotency, transaction states and reconciliation.
https://t.co/EEQTdIASCX
#DotNet #SoftwareArchitecture
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
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
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
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
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:
https://t.co/hJbqWOSlmO
#DotNet #ApplicationSecurity
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
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
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
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
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:
https://t.co/kW9E7s9qRn
#DotNet#SQLServer
One dropdown selection in a legacy https://t.co/GT0S4nH6sJ 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
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
A legacy https://t.co/GT0S4nGyDb 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
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
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:
https://t.co/Re07gtrsIn
#SQLServer #DotNet
@getQueryFlow Exactly. And the tricky part is when different teams have been using different definitions for years. That's why I prefer validating the business rules and edge cases before changing the SQL. Otherwise, we risk making a technically correct report even more misleading.
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
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