Hello, this is the scenario.
I have an application that load at runtime severals dll. these dll are actually "adapters" that wraps calls to web services, database and so on.
The app.config of the "main" application stores in config sections all information necessary to each adapter (i.e.Web ServiceURL..) and I have created inside each adapter a class to ready those values
the loading at run time the DLL has been implemented by storing all necessary types into a dictionary of generics and when I need to instanciate it I call the Activate.CreateObject and I pass the specific type (I means the name of the Adapter class)
The problem is that the adapter class itself is not able to get the config value because ConfigSection has not been initialized.
If I write:
IInterfaceAdap adapt = new myAdapter() -> I read the config data
IInterfaceAdap adapt = (IInterfaceAdap)Activator.CreateObject (type) -> now way to read the data stored in the App.Config.
I think that I undertood the problem but I'm not able to find a workaround to read data store in the app.config!!
I need help please!!
View Complete Post