Hi misters,
i have an app.config of my App that uses WCF.
I need change the configuration servicemodel, and I want update somes values.
//standard method from System.Configur ation
Configuration appConfig = ConfigurationMa nager.OpenExeCo nfiguration( "Path
to my App.config");
//the main section in the app.config file for WCF
ServiceModelSec tionGroup serviceModel =
ServiceModelSec tionGroup.GetSe ctionGroup( appConfig );
First, how can I set values for modify some endpoint address, for change
localhost and port and set another values.
<system.service Model>
<bindings>
<netTcpBindin g>
<binding name="NewBindin g0" maxReceivedMess ageSize="100000 000">
<readerQuotas maxArrayLength= "163840000" />
<security mode="None">
<transport clientCredentia lType="Windows" protectionLevel ="None"
/>
<message clientCredentia lType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tc p://localhost:8090/ServicioBase/servicio"
binding="netTcp Binding" bindingConfigur ation="NewBindi ng0"
contract="GRUPO BACKUP.WCF.Serv icioBase.Contra to.IServicioBas e"
name="AgenteSer vicioBase" />
<endpoint address="net.tc p://localhost:8091/ServicioLog/servicio"
binding="netTcp Binding" bindingConfigur ation="NewBindi ng0"
contract="GRUPO BACKUP.WCF.Log. Contrato.ILog"
name="AgenteLog " />
</client>
</system.serviceM odel>
Then, how I can refresh section or app.config ? using
System.Configur ation.Configura tionManager.Ref reshSection(... ) ???
ConfigurationMa nagerRefreshSec tion("system.se rviceModel")
ConfigurationMa nager.RefreshSe ction("system.s erviceModel/services")
ConfigurationMa nager.RefreshSe ction("system.s erviceModel/bindings")
Any ideas, suggestions, comments ?
Thanks in advance, greetings, your help is very grateful !!
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.com/churrosoft
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft