Answer Question
Ho to configure a DLL
Ok, I have the following scenario:
I developped a .Net library which wraps functions provided by a back end system. This DLL uses data such as connection strings and user credentials etc. This is a generic DLL which can be used in all sorts of situations. We are currently using it from a web service.
My problem now is, to find the best approach in order to read config information i.e. connection string. The apporach has to be flexible. In case of the web service usage, should it read the configuration from the web.config? And how do I tell the DLL where the web.config is, without having the location of the web service hard coded? And what if the DLL is used by a windows application? The DLL doesn't know from where it is used! Should I rather have a manual process i.e. have my customs defined dll.config?
I am not after coding examples since I know how to read from config files. I am looking for a best approach or pattern to use.
What are your thoughts? How do you solve such a situation?
Cheers & Thanks
Peter
TEXT
Uploading file and scanning for virus...
Please Wait