Load configuration from line

I want to create a Configuration object from a string or xml stream, not a file. But as far as I can see, ConfigurationManager requires a file path to instantiate the Configuration object. Does anyone know a way to create a configuration object from something other than a file?

+3
source share
1 answer

Just save the stream to a file with System.IOand download it with

ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap(filename))

Documentation

http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.openmappedexeconfiguration(v=VS.90).aspx

+1
source

All Articles