How to read web.config file in .Net Core app

后端 未结 6 1469
逝去的感伤
逝去的感伤 2020-12-01 15:51

I have created a .Net Core API and I referenced a .Net framework application to it. The referenced Application connects to a data base and its connection string is stored in

6条回答
  •  眼角桃花
    2020-12-01 16:55

    For everyone having problem reading web.config in asp.net core. After spending hours trying and failing.. then i came to a blog which stated

    The .Net Core application uses appsettings.json instead of web.config file.

    so i suggest everyone to place files they want to read to appsettings.json and from there you can read. There are plenty of methods available. Just wanted to save time of those trying.

提交回复
热议问题