Edit system.serviceModel on app.config when installing new version of the software

451 Views Asked by At

I have a software written in C# WPF. In the file app.config I have this section:

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IXXXCustomer" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxBufferSize="400000" maxReceivedMessageSize="400000"
          textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
          messageEncoding="Text">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://update.xxx.com/xxxCustomer.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IxxxCustomer" contract="xxxService.IxxxCustomer" name="BasicHttpBinding_IxxxCustomer"/>  
    </client>
    </system.serviceModel>

I have the need that maxBufferSize and maxReceivedMessageSize change their value. To do this I manually edit the file and in debug all works fine.

When I released the software on pc clients where my application is already installed, how can I change the softwarename.exe.config file containing these values?

0

There are 0 best solutions below