❔ Access AppSettings from CSHTML in ASP.NET core
I am trying to read from my AppSettings.json file but am getting undefined returned. What am I missing here?
6 Replies
try and check getting
AppSettings.json
file first.not sure what you mean...
I meant before using GetSection, just try to see you are even getting the appsetting.json file.
I don't know how it works but just trying to tell you a way to debug. Apologies if not of much use.
What would be the syntax for that?
weird, that should work. Is Configuration injected properly?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.