官术网_书友最值得收藏!

Configuration

This chapter covers the configuration of an ASP.NET Core application. Every application needs configuration in one form or another because it makes it much easier to change the underlying behavior should anything happen—think about connection strings, credentials, Internet Protocol (IP) addresses, or any other kind of data that can change over time and is therefore not appropriate to be hardcoded.

Configuration can be done in many ways, some of which don't even require redeploying your application, which is a huge benefit. Luckily, .NET Core was conceived with this in mind and is also very extensible, so it can cover most scenarios, basic and advanced. It also plays nicely with other aspects, such as security and dependency injection.

Also, a very typical configuration just features switching or toggling: something is either enabled or not. .NET Core 3 introduced a new feature toggling library that is outside the main configuration framework, but it will be covered here.

After reading this chapter, you should be able to understand the following:

  • How the configuration works on the .NET Core framework
  • Which configuration sources we have available
  • How to extend it to be more helpful and match your necessities
  • Runtime host configuration
  • The new feature toggle mechanism introduced in .NET Core 3
主站蜘蛛池模板: 永福县| 安庆市| 广灵县| 裕民县| 泰来县| 二连浩特市| 游戏| 赤水市| 宁海县| 东辽县| 津市市| 宜良县| 石屏县| 宝坻区| 金塔县| 鸡东县| 天水市| 扎兰屯市| 富顺县| 咸丰县| 额尔古纳市| 连山| 泰安市| 新民市| 临洮县| 汶川县| 河池市| 温宿县| 塘沽区| 会东县| 哈密市| 随州市| 吴旗县| 庆云县| 循化| 慈利县| 西吉县| 宜兰县| 龙门县| 肃宁县| 江永县|