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

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
主站蜘蛛池模板: 嘉荫县| 长宁区| 凤台县| 苍南县| 彩票| 江达县| 商河县| 太保市| 吉水县| 屯门区| 驻马店市| 北安市| 宜昌市| 西乌| 光泽县| 孝昌县| 丰宁| 微博| 琼中| 承德县| 永丰县| 白水县| 策勒县| 益阳市| 双牌县| 新郑市| 弋阳县| 平昌县| 德昌县| 来凤县| 武邑县| 丹凤县| 桂平市| 若尔盖县| 宝丰县| 黎城县| 浪卡子县| 称多县| 公安县| 南涧| 红安县|