![Playing with the .NET 8 Web API template](/.netlify/images?url=%2Fimages%2Fweather_flag.webp)
ASP.NET Core
List of articles about ASP.NET Core
![Playing with the .NET 8 Web API template](/.netlify/images?url=%2Fimages%2Fweather_flag.webp)
![ASP.NET Core - Lost in configuration](/.netlify/images?url=%2Fimages%2Ftokyo.jpg)
Development
ASP.NET Core - Lost in configuration
Have you ever felt a bit overwhelmed by the configuration in a project, not knowing where to look for the settings between the command line parameters, the environment variables, the configuration files in code, the configuration in Azure, ... ? When developing an ASP.NET Core application there are many places where you can put your configuration which makes it difficult to know where you should put it. Even if the official documentation about configuration in ASP.NET Core is very complete and well written, it only describes what you can use and how to use it, not what you should use and when. In this article, I will try to answer these questions and give you my opinion about how we should use configuration providers in ASP.NET Core.
![How to connect to an Azure SQL Database from C# using Azure AD](/.netlify/images?url=%2Fimages%2Fcloud-azure_1.jpg)
![Once upon a time in .NET](/.netlify/images?url=%2Fimages%2Fwestern_1.jpg)
Development
Once upon a time in .NET
In this article, I want to talk about a few things in .NET such as HTTP requests with an Http Client, HTTP message handlers, records... For the theoretical aspect of these topics, I think the official documentation on docs.microsoft.com and many blog articles already explain them very well, better than I could ever do. But what I am interested in here is to talk about these topics through a case study.
![Handle token retrieval while querying an API](/.netlify/images?url=%2Fimages%2Fkeyboard_1.jpg)
Development
Handle token retrieval while querying an API
In our daily job, we often have to query secure REST APIs that require our HTTP requests to have a valid access token in their Authorization header.
Of course, many APIs come with an SDK that makes the job easier for us as it directly takes care of retrieving a token and sending the authenticated HTTP requests.
However, it is not always the case and knowing how to implement that using HttpClient, IMemoryCache, and DelegatingHandler can become pretty useful.