It is possible to read the <system.runtime.remoting> section of a
configuration file similarly to the way that you can read a user-defined
section using ConfigurationSettings.GetConfig()? I'm finding that
attempting to load and read the <system.runtime.remoting> section as if it
were a user-defined section results in a ConfigurationException being thrown
that says that the section is already defined.
My scenario is a Windows Service that is using
RemotingConfiguration.Configure() to host remote objects.
Thanks,
Chris
Chris B. - 30 Jan 2004 20:41 GMT
FWIW, I found and used:
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
;
XmlNode xmlNode =
xmlDocument.SelectSingleNode("configuration/system.runtime.remoting");
ConfigurationItem configurationItem = new ConfigurationItem(xmlNode);
with a pre-existing ConfigurationItem object that I have already implemented
which provides access to all of the data contained with an XmlNode of a
configuration file.
Chris
It is possible to read the <system.runtime.remoting> section of a
configuration file similarly to the way that you can read a user-defined
section using ConfigurationSettings.GetConfig()? I'm finding that
attempting to load and read the <system.runtime.remoting> section as if it
were a user-defined section results in a ConfigurationException being thrown
that says that the section is already defined.
My scenario is a Windows Service that is using
RemotingConfiguration.Configure() to host remote objects.
Thanks,
Chris