Rohan

Rohan

  • 1.4k
  • 732
  • 18.9k

Get value from appsettings.json

Dec 6 2021 9:26 AM

Hello, everyone, I have to use this code to get value from the appsetting.json file and this is my code but I have faced an error. Please check this.

 const string endpointSecret = _config["St:Secret"];

The expression being assigned to 'endpointSecret' must be constant - Error 


Answers (2)