Base solution for your next web application
Open Closed

Adding and reading new settings to appsettings.json #6512


User avatar
0
aggarwal created

Hi,

I have coded a new integration. I want to store the url and secrets etc in the appsettings.json.

Is there a class available to retrive the setting in code? Any pointers/examples will be much appreciated.

Cheers, Vikas

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Try to inject IConfigurationRoot directly or use ASP.NET Core Options

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    aggarwal created

    Thanks. will try.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)