<appSettings>
<add key="ApiKey" value="xyz"/>
</appSettings>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="smtp.cloudmailapp.com" port="587" userName="user@gmail.com" password="xyz" />
</smtp>
</mailSettings>
</system.net>
As you can see, the API key "xyz" appears twice, hardcoded.
Can I use code here? I'd like to be able to call
WebConfigurationManager.AppSettings["ApiKey"]
within the Web.config file, or something similar.