Rositsa Ruseva

Rositsa Ruseva

  • 2k
  • 153
  • 7.8k

Error while calling Configuration.GetSection

Sep 27 2022 9:19 PM

The error that I get is: 

An object reference is required for the non-static field, method, or property 'Configuration.GetSection(string)'

I have the following code:

StripeConfiguration.ApiKey = Configuration.GetSection("Stripe")["ApiKey"];


Answers (5)