Hi
How do I programmaticall y change (read/write) the values in this app.config
file at runtime? Specifically I want to change the client endpoint address
but it would be nice to change other values too. I thought this is what
ServiceHost is for but is seems way more complicated to use for what I'm
trying to do.
<system.service Model>
<bindings>
<basicHttpBindi ng>
<binding name="DataServi ceSoap" closeTimeout="0 0:01:00"
openTimeout="00 :01:00"
receiveTimeout= "01:00:00" sendTimeout="00 :01:00"
allowCookies="f alse"
bypassProxyOnLo cal="false"
hostNameCompari sonMode="Strong Wildcard"
maxBufferSize=" 67108864" maxBufferPoolSi ze="524288"
maxReceivedMess ageSize="671088 64"
messageEncoding ="Text" textEncoding="u tf-8"
transferMode="B uffered"
useDefaultWebPr oxy="true">
<readerQuotas maxDepth="32" maxStringConten tLength="8192"
maxArrayLength= "16384"
maxBytesPerRead ="4096" maxNameTableCha rCount="16384" />
<security mode="None">
<transport clientCredentia lType="None"
proxyCredential Type="None"
realm="" />
<message clientCredentia lType="UserName "
algorithmSuite= "Default" />
</security>
</binding>
</basicHttpBindin g>
</bindings>
<client>
<endpoint address="http://webservice.com/Service.asmx"
binding="basicH ttpBinding" bindingConfigur ation="DataServ iceSoap"
contract="MySer vice.DataServic eSoap" name="DataServi ceSoap" />
</client>
</system.serviceM odel>
Many thanks
Andrew
How do I programmaticall y change (read/write) the values in this app.config
file at runtime? Specifically I want to change the client endpoint address
but it would be nice to change other values too. I thought this is what
ServiceHost is for but is seems way more complicated to use for what I'm
trying to do.
<system.service Model>
<bindings>
<basicHttpBindi ng>
<binding name="DataServi ceSoap" closeTimeout="0 0:01:00"
openTimeout="00 :01:00"
receiveTimeout= "01:00:00" sendTimeout="00 :01:00"
allowCookies="f alse"
bypassProxyOnLo cal="false"
hostNameCompari sonMode="Strong Wildcard"
maxBufferSize=" 67108864" maxBufferPoolSi ze="524288"
maxReceivedMess ageSize="671088 64"
messageEncoding ="Text" textEncoding="u tf-8"
transferMode="B uffered"
useDefaultWebPr oxy="true">
<readerQuotas maxDepth="32" maxStringConten tLength="8192"
maxArrayLength= "16384"
maxBytesPerRead ="4096" maxNameTableCha rCount="16384" />
<security mode="None">
<transport clientCredentia lType="None"
proxyCredential Type="None"
realm="" />
<message clientCredentia lType="UserName "
algorithmSuite= "Default" />
</security>
</binding>
</basicHttpBindin g>
</bindings>
<client>
<endpoint address="http://webservice.com/Service.asmx"
binding="basicH ttpBinding" bindingConfigur ation="DataServ iceSoap"
contract="MySer vice.DataServic eSoap" name="DataServi ceSoap" />
</client>
</system.serviceM odel>
Many thanks
Andrew
Comment