Rositsa Ruseva

Rositsa Ruseva

  • 1.5k
  • 218
  • 35.3k

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)