I have one class Library Project for Payment. The live credential of client is on web.config file of website and this class library project will added in bin in form of dll. So How to get ConfigurationManager in Class Library So I can get credential of Client and make Payment
The ConfigurationManager class enables you to access machine, application, and user configuration information. This class replaces the ConfigurationSettings class, which is deprecated. For web applications, use the WebConfigurationManager class.
Class libraries can access configuration settings in the same way as executable apps, however, the configuration settings must exist in the client app's App. config file.
ConfigurationManager was added to support ASP.NET Core's new WebApplication model, used for simplifying the ASP.NET Core startup code.
GetSection(String) Method (System. Configuration) Retrieves a specified configuration section for the current application's default configuration.
Add Reference System.Web
to your Class Library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With