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.Configuration
Configuration appConfig = ConfigurationManager.OpenExeConfiguration( "Path
to my App.config");
//the main section in the app.config file for WCF
ServiceModelSectionGroup serviceModel =
ServiceModelSectionGroup.GetSectionGroup( appConfig );
First, how can I set values for modify some endpoint address, for change
localhost and port and set another values.
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NewBinding0" maxReceivedMessageSize="100000000">
<readerQuotas maxArrayLength="163840000" />
<security mode="None">
<transport clientCredentialType="Windows" protectionLevel="None"
/>
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://localhost:8090/ServicioBase/servicio"
binding="netTcpBinding" bindingConfiguration="NewBinding0"
contract="GRUPOBACKUP.WCF.ServicioBase.Contrato.IS ervicioBase"
name="AgenteServicioBase" />
<endpoint address="net.tcp://localhost:8091/ServicioLog/servicio"
binding="netTcpBinding" bindingConfiguration="NewBinding0"
contract="GRUPOBACKUP.WCF.Log.Contrato.ILog"
name="AgenteLog" />
</client>
</system.serviceModel>
Then, how I can refresh section or app.config ? using
System.Configuration.ConfigurationManager.RefreshS ection(...) ???
ConfigurationManagerRefreshSection("system.service Model")
ConfigurationManager.RefreshSection("system.servic eModel/services")
ConfigurationManager.RefreshSection("system.servic eModel/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