How to Block IP Addresses in ASP.NET Core Web API
In this article, we are going to learn how to block IP addresses in ASP.NET Core Web API. This demo makes use of the reverse proxy tool ngrok...
MY ARTICLES:
In this article, we are going to learn how to block IP addresses in ASP.NET Core Web API. This demo makes use of the reverse proxy tool ngrok...
In this article, we're going to learn about anonymous types in C#. After learning what they are, we're going to learn how to use them in various scenarios through examples. [sc name="github"...
In this article, we are going to learn how to mock asynchronous methods using Moq. Moq is an easy-to-use and most popular framework to mock tests using .NET. [sc name="github"...
In this article, we are going to share the different methods on how to remove duplicates from an array in C#. In addition, we are going to compare these methods to check their performance. Arrays contain multiple values of the same type. It’s a common occurrence to...
In this article, we are going to learn how to use regular expressions for user input validation in Blazor WebAssembly applications. ...
In this article, we are going to learn how to register services for different environments in .NET. Let's start. Reasons to...
In this article, we are going to learn how to create a comma-separated string from a list of strings in C#. Let's dive...
In this article, we are going to learn how we can Copy to Clipboard in a Blazor WebAssembly Project. Let's start. How to Copy to Clipboard in...
In this article, we are going to learn how to implement an API Gateway using Ocelot. Ocelot is an open-source API Gateway, designed for microservices architecture. We already have an article about API Gateway, where we explained a lot about this subject. So, if you...
In this article, we are going to learn why and how to use the when keyword within try-catch blocks while handling exceptions in C#. We cannot avoid the occurrence of exceptions in the life cycle of an application. An exception is a problem that appears unexpectedly...
Reading from a CSV file in C# is a common operation. In this article, we are going to show how to easily read data from a CSV file in C# using the CSVHelper NuGet package. [sc name="patreon-source-code"...
In this article, we are going to learn the most efficient and popular solutions to a very common problem - checking if a number is a power of 2. While it seems an easy task, we will see that some of these solutions are faulty in presence of corner cases. [sc...
In .NET, there is no built-in way to copy the entire contents of a directory including subfolders and their content. In this article, we will explore a clean, platform-agnostic solution for this operation. Additionally, we will see how we can implement this in the...
A typical web API returns JSON or XML responses. However, rare cases exist where we need to return responses in other formats. In this article, we are going to learn how to return HTML from ASP.NET Core Web API. We will also state some use cases for this type of API....
In this article, we are going to learn about Sorting and Filtering with LINQ. Language-Integrated Query, or LINQ for short, provides a robust set of language extensions that we can use to shape query results according to our current needs. LINQ not only allows for a...
In this article, we are going to see how to add multiple POST actions to our Web API controller. For the demonstration, we are going to use the .Net 6 Web API project. [sc name="github"...
In this article, we are going to look at using charts with Angular and ASP.NET Core Web API to visualize the relationship between data. We'll use Google Charts to create the visualization. It is a Javascript-based library used for data charting and visualization. We...
Priority Queue in C# is a very useful data structure that has so many real-world applications. In this article, we are going to cover the main concepts of Priority Queue in C#. We have covered the basic Queue in C#, it is recommended to check it out before continuing...
Often we come across scenarios where invoking a Web API endpoint triggers long-running tasks. In this article, we're going to explore the different ways we can implement such a long-running task in an ASP.NET Core Web API. [sc name="github"...