none
Generate configuration file with non-default binding configuration in WCF 4.5 RRS feed

  • Question

  • Hi,

    I am using WCF 4.5 for generating configuration file.

    I have referred following MSDN link for generating configuration file.

    https://msdn.microsoft.com/en-us/library/hh309266(v=vs.110).aspx

    I want binding property for e.g 'maxReceivedMessageSize'  in configuration file.

    I changed default value of 'maxReceivedMessageSize' to non-default value, but i could not able to saw 'maxReceivedMessageSize' binding property in configuration file.

    Is anyone know why i am not able to see non-default value in configuration file.

    Thanks.



    • Edited by ashinde2 Monday, February 16, 2015 7:03 AM
    Monday, February 16, 2015 6:45 AM

All replies

  • Hi ashinde2,

    In WCF 4.5 the generated configuration files contain only those binding properties that are set to a non-default value. If the property uses the default value, then we can not be able to see it in the config file. So in my mind if you have changed the maxReceivedMessageSize to a non-default value, then you should be able to see it in your config file.

    Besides, could you please try to post your config file in here?

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 17, 2015 6:39 AM
    Moderator
  • Hi Amy,

    Thanks for reply. Please see below content of configuration file.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <netTcpBinding>
                    <binding name="TestCustBind_CustomerService" />
                </netTcpBinding>
            </bindings>
            <client>
                <endpoint address="net.tcp://ABC/CustTest"
                    binding="netTcpBinding" bindingConfiguration="TestCustBind_CustomerService"
                    contract="CustomerService" name="TestCustBind_CustomerService">
                    <identity>
                        <userPrincipalName value="admin@XYZ.com" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>
    </configuration>

    Thanks.


    • Edited by ashinde2 Tuesday, February 17, 2015 8:38 AM
    Tuesday, February 17, 2015 8:36 AM
  • I test it, it should work.
    Friday, March 6, 2015 10:39 AM