Microsoft.WindowsAzure.Commands.Utilities.Common.ConfigurationConstants.WebHttpBinding C# (CSharp) Method

WebHttpBinding() public static method

public static WebHttpBinding ( int maxStringContentLength ) : System.ServiceModel.Channels.Binding
maxStringContentLength int
return System.ServiceModel.Channels.Binding
        public static Binding WebHttpBinding(int maxStringContentLength = 0)
        {
            var binding = new WebHttpBinding(WebHttpSecurityMode.Transport);
            binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
            binding.ReaderQuotas.MaxStringContentLength =
                maxStringContentLength > 0 ?
                maxStringContentLength :
                MaxStringContentLength;

            // Increasing MaxReceivedMessageSize to allow big deployments
            binding.MaxReceivedMessageSize = MaxReceivedMessageSize;

            return binding;
        }
    }
ConfigurationConstants