I have an ASP.NET MVC 5 app. My app has a web.config app. In this app, I have a custom section that looks like this:
<service.settings>
<service1 isEnabled="true" emailAddress="someone@somewhere.com" />
<service2 isEnabled="true" emailAddress="another@address.com" />
<bonzai type="ficus" age="13" />
</service.settings>
My question is, how do I access these configuration values in my C# code? I'm familiar with ConfigurationManager.AppSettings
. However, I'm not sure how to get configuration settings out of custom sections.