title: How to set the MaxReceivedMessageSize programmatically when using a WCF Client?
body: <p>I want to set the MaxReceivedMessageSize property to some higher limit (Due to (400) Bad Request error) in my client programmatically.
  This is the code I am using...</p>
  
  <pre><code>WCFServiceTestClient wcfClient = 
      new WCFServiceTestClient(new wsHttpBinding(), strServiceURL);
  </code></pre>
  
  <p>My service url is dynamic and hence cannot use the web.config.</p>
  
  <pre><code>//The following code doesn't seem to take effect
  ((WSHttpBinding)wcfClient.ChannelFactory.Endpoint.Binding)
          .MaxReceivedMessageSize = 2147483647;
  </code></pre>
  
  <p>What am I doing wrong?</p>