We have an API that handles ~45k monthly requests that was, at times, responding strangely. I suspected it was related to the .NET Core service lifetimes. The symptoms in question were that out of the blue, the API response body had a status code of 409 with a message of invalid user-provided values, however, the […]
Postman Tips for Better API Testing
Postman is a powerful tool for testing and working with APIs. In this blog post, I will describe some Postman tips for better API testing that I have used for quite some time and have helped tremendously.
Calling and Authenticated API from Next.js Server Side
Calling an authenticated API from Next.js server side is a little different than calling it from the client side and concerning authentication cookies.
Mocking External APIs or services in .NET
Whether calling the external API costs money or mocking desired behavior to code specific business rules. Sometimes external APIs could be mocked during the development of services or APIs. I believe this is an important strategy in every developer’s toolbox.
.NET Global Exception Handler to Return Problem Details For Your APIs
This article will focus on handling custom exceptions for flow control on .NET with a global exception handler and return a problem details object. Having said that. There are, for the most part, two schools of thought. One where it is OK to throw a (custom) exception to control flow. i.e. Throw a UserNotFoundException when […]
Run Load (Performance) Testing with Postman
I recently found Postman has built-in capability to run load (performance) testing. Some use cases to run load testing are identifying bottlenecks, latency, and failures on your API when calling at near production scale.
Configure CORS in .NET
We need to configure CORS in .NET (or really in any other language) when an application’s front-end and back-end are being served from different domains, aka origins. And more than likely, during development, both the front-end and back-end will be running from different ports on localhost.
.NET Core Options Pattern For Live Reload Settings
There are many great posts about implementing the Options Pattern .NET Core with IOptionsMonitor on the interwebs, but many fail to point out one “gotcha” when working with IOtionsMonitor to live reload settings.
Solved: GraphQL and Hot Chocolate Workshop issues with the latest versions of Hot Chocolate and .NET Top-Level Statements
I started working on the official “Getting started with GraphQL on ASP.NET Core and Hot Chocolate – Workshop” tutorial, but since the workshop is a bit outdated, it targets .NET 5 and an older version of Hot Chocolate. I am using the latest .NET 7 (at the time of this writing) and top-level statements. In […]
Fix Synology Photos Not Playing HVEC Videos And Not Reading Taken Timestamp
If you are still running Synology DSM 6 and are looking into migrating to Synology DSM 7, and one of the main Synology apps you use is Photo Station, there are some major changes in how Synology handles photo uploading in the new Synology Photos app.