title: How to increase the file size limit in WCF console application
body: <p>I've having a very simple WCF service (a console application  for file upload). I keep getting error (400) bad request. It works when I upload small files (4kb) but failing for 700kb. </p>
  
  <p>From the readings I've done from stack overflow and other, I'll have to increase the MaxReceivedMessageSize. This was implemented using a custom class and overriding the OnOpening method but it still didn't work.</p>
  
  <p>I'm testing with a console application using the webclient<br>
      <code>outputBytes = webClient.UploadData(baseUrl + "/uploads/2." + filenameOnly,     File.ReadAllBytes(filename));</code></p>
  
  <p>Also, I'm using the WebServiceHost as in<br>
      <code>var uri = new Uri("http://localhost:8000");<br>
          var svc = new WebServiceHost(typeof (UploadService), uri);</code></p>
  
  <p>How do I solve this issue? 
  PS: Application does not have a config file so I'll looking at how to set this in code. If not and a config  file is needed, then what should be the content.</p>
  
  <p>Notes:
  I found this link <a href="https://stackoverflow.com/questions/1607437/bad-request-error-400-wcf-client">Bad Request Error 400 - WCF Client</a> where it was explained that those properties are only valid for soap based services. He suggested updating the web.config. Since this is a console application, I'm wondering how this can be done'  </p>
  
  <p>regards.</p>