Creating a time-based one-time password (TOTP) along with its expiration time


By default, .NET uses the Rfc6238AuthenticationService class for generating and validating TOTP (Time-Based One-Time Password) codes. The issue with this class is that the generated TOTP code remains valid for 9 minutes, a timeframe hardcoded and unchangeable. ....
Read more

Advanced Health Check Asp.Net Core


During application development on our system, we can easily test external services or databases that we work with to see if we can access the database or external service or not. However, this becomes a bit challenging after uploading to the main servers ....
Read more

Load testing with Locust


In this article, we introduce a tool for testing APIs. Locust is one of the tools that provides the capability to send a large number of requests. To use Locust, we can utilize its Docker image and create a Python file named "locustfile.py" where we define the necessary ....
Read more

Strategy design pattern in C#


Strategy is a design pattern where a set of rules is defined and allows us to have different implementations. For example, suppose we want to write a repository for reading data that allows us to change where the data is read (with minimal changes to the code) in the future. We can store ....
Read more

How is null stored in ValueTypes in c#?


In C#, there are two types of data types: ValueType and ReferenceType. These types have their own unique characteristics. One of the features we want to discuss in this article is the ability to assign a Null value to ValueTypes. ReferenceTypes do not store the actual data; instead, they store ....
Read more