Exposing ConfigurationManager to COM applications


i maintaining classic asp application has numerous values hardcoded throughout entire application.  migrate of hardcoded values out of application , configuration file similar storing configuration values in .config files using .net.

my plan create com-visible class library wraps functionality of system.configuration.configurationmanager class retrieving configuration settings standard configuration sections such appsettings, connectionstrings etc.  have been using configurationmanager.appsettings, configurationmanager.connectionstrings etc. method calls in c#.net code retrieve relevant information.

however, 1 of issues have encounted classic asp pages have not been able find or locate associated .config files.  know in .net, .config files need match name of assembly dll named myassembly.dll have corresponding .config file named myassembly.dll.config.  however, there no such association between com , .net config files.  therefore, how com libraries appropriately read values .config files using configurationmanager api?

please advise.

you can use configurationmanager.openexeconfiguration method open config file, old post discussed more on this, hope useful you.
eric yang [msft]
msdn community support | feedback us
get or request code sample microsoft
please remember mark replies answers if , unmark them if provide no help.



.NET Framework  >  Common Language Runtime Internals and Architecture



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'