ASP.NET Core AppSettings: How to read AppSettings.json in .NET (works with .NET 6)

Reading the appsettings.json file in ASP.NET Core allows us to use the settings within our web application.

Whether you’re using .NET Core, or new versions of .NET, this video will show you how to use this configuration file in C#. In-addition, it’ll show you how to read the connection string. This is useful if you’re using SQL Server.

The AppSettings can be used in many web frameworks, such as a Web API, MVC and Blazor, and the samples used in this video will help you understand on how to implement it.

This video will also show how to group settings into multiple files, how to validate the configuration, and how to use it in a console application.

💻 Download the code example for this demo 💻

📖 Learn .NET and C# with our online courses 📖

► More Information:

► Chapters
0:00 Introduction
0:48 Join our Discord Community
0:58 Create the Web Application
2:47 Setting up Custom Configuration
15:07 Validating Configuration
19:53 Create a Separate Configuration File
22:51 Importing Connection Strings Configuration
28:01 Using AppSettings in a Console Application
36:42 Good Support

#aspnetcore #appsettings #configuration