开发者

How to set MaxItemsInObjectGraph programmatically

开发者 https://www.devze.com 2023-01-22 18:37 出处:网络
This is how I am configuring the client from code var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);

This is how I am configuring the client from code

    var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
    binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;

    binding.MaxBufferSize = Int32.MaxValue;
    binding.MaxReceivedMessageSize = Int32.MaxValue;
    binding.ReaderQuotas.MaxDepth = Int32.MaxValue;
    binding.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
    binding.ReaderQuotas.MaxArr开发者_开发问答ayLength = Int32.MaxValue;
    binding.ReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
    binding.ReaderQuotas.MaxNameTableCharCount = Int32.MaxValue;


    BnsApiClient client = new BnsApiClient(binding, new EndpointAddress("http://mysite/Hello.svc"));


How can I set the maxItemsInObjectGraph property programmatically from a Silverlight Application?

0

精彩评论

暂无评论...
验证码 换一张
取 消