Configuration.GetSection always returns null

前端 未结 9 1159
借酒劲吻你
借酒劲吻你 2020-12-16 09:01

Every time I call Configuration.GetSection, the Value property of the returned object is always null.

My Startup constructor

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 09:33

    Try add ConfigurationProvider to ConfigurationBuilder.

    App configuration is provided from:

    • appsettings.json using the File Configuration Provider.
    • appsettings.{Environment}.json using the File Configuration Provider.

提交回复
热议问题