H
Hardy Wang
Hi all,
I understand, in .Net 2.0 we have little bit different model to read
config file from .Net 1.1. Basically I need to use
WebConfigurationManager.AppSettings to read from web.config, and
ConfigurationManager.AppSettings to read from Windows Application config.
Here is my question, I have a class library project which will be
referenced by both Web and Windows Application in different projects, I need
to read config setting inside this class library, how should I know which
environment is it in (web or windows) and based on environment to call
different API to load setting? And what is the best practice in this
scenario to handle config file?
I understand, in .Net 2.0 we have little bit different model to read
config file from .Net 1.1. Basically I need to use
WebConfigurationManager.AppSettings to read from web.config, and
ConfigurationManager.AppSettings to read from Windows Application config.
Here is my question, I have a class library project which will be
referenced by both Web and Windows Application in different projects, I need
to read config setting inside this class library, how should I know which
environment is it in (web or windows) and based on environment to call
different API to load setting? And what is the best practice in this
scenario to handle config file?