One more thing... the WCF client only starts doing this after you have called it once (ie you can change the config as many times as you like before using it for the first time and it picks up the correct one)

Wcf.StopBeingLazyAndFetchMyNewConfigNowNow=tru;





calling wcf gurus...

Does something in wcf cache the service.model section?

I've modified the config file, specifically the endpoint address in

<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="BehaviorHTTP">
<clientVia viaUri="https://192.168.10.1:443/ServiceName"/>
</behavior>

and then...
cfg.Save();
ConfigurationManager.RefreshSection("system.serviceModel/behaviors");
..and tried all other variants of RefreshSection.

RefreshSection *works*... when I inspect the config (via ConfigurationManager) its updated, but when I declare my Binding again, eg

var client = new Service("serviceName");

this picks up the previously saved URI in the clientVia element.

Where is it getting it from because the ConfigurationManager certainly returns the correct value.



Reply via email to