Hi all,
I've build a component to log events in any application that uses it. I'm storing the event log name, source in the app.config. I read the configuration using ConfigurationManager.AppSetting["EventLog"] etc. Now I'd like to use the component in my web app too. In this case, I'd be reading the config from web.config using WebConfigurationManager.AppSetting["EventLog"] etc..
So my question is that how do I, in my component, identify which type of config file the application using then the component would load the settings from the correct file?
Dawa Tsering
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature