Hi,
i have a libarary file and it has its own app.config file.
I am deploying the library in a web site along with the condiguration file and while reading the configuration i am using the following code to read the settings from the libraries configuration file.
Code
Is this the correct way to do it ot is there any other way to do the same
Needs help regarding this
i have a libarary file and it has its own app.config file.
I am deploying the library in a web site along with the condiguration file and while reading the configuration i am using the following code to read the settings from the libraries configuration file.
Code
ExeConfigurationFileMap
fileMap = newExeConfigurationFileMap();Assembly asm = Assembly.GetCallingAssembly();Uri uri = newUri(Path.GetDirectoryName(asm.CodeBase));fileMap.MachineConfigFilename =
Path.Combine(uri.LocalPath, "library.dll.config");Configuration
applicationSettings = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);Is this the correct way to do it ot is there any other way to do the same
Needs help regarding this