Using C # .NET 3.5 and WCF, I am trying to write out part of the WCF configuration in a client application (the name of the server to which the client connects).
The obvious way is to use the ConfigurationManager to load the configuration section and write the data I need.
var serviceModelSection = ConfigurationManager.GetSection("system.serviceModel");
Appears to always return null.
var serviceModelSection = ConfigurationManager.GetSection("appSettings");
Works great.
The configuration section is present in App.config, but for some reason the ConfigurationManager refuses to load the system.ServiceModel section.
I do not want to manually download the xxx.exe.config file and use XPath, but if I have to resort to what I will do. It just seems like it's a hack.
Any suggestions?
DavidWhitney Aug 21 '08 at 10:27 2008-08-21 10:27
source share