How to change MetadataExchangeClient reader quota values

            CustomBinding mexBinding = new CustomBinding(MetadataExchangeBindings.CreateMexHttpBinding());                        for (int i = 0; i < mexBinding.Elements.Count; i++)            {                 HttpTransportBindingElement transport = mexBinding.Elements[i] as HttpTransportBindingElement;                if (transport != null)                {                    transport.MaxReceivedMessageSize = int.MaxValue;                                    }                TextMessageEncodingBindingElement textMEBE =                     mexBinding.Elements[i] as TextMessageEncodingBindingElement;                               if (textMEBE != null)                {                     textMEBE.ReaderQuotas.MaxArrayLength = textMEBE.ReaderQuotas.MaxBytesPerRead =                         textMEBE.ReaderQuotas.MaxDepth =…

0

How to collect System.net tracing

// Add following config to your WCF app config file , Since we use System.net API also ,you can trace System.net API calls to debug WCF apps <configuration><system.diagnostics>    <trace autoflush=”true” />        <sources>            <source name=”System.Net”>                <listeners>                    <add name=”System.Net”/>                </listeners>            </source>            <source name=”System.Net.HttpListener”>                <listeners>                    <add name=”System.Net”/>                </listeners>            </source>            <source name=”System.Net.Sockets”>                <listeners>                    <add name=”System.Net”/>                </listeners>            </source>            <source name=”System.Net.Cache”>                <listeners>                   …

1