Suppressing Expect 100-Continue on your Requests

WCF has a very powerful extensibility mechanism around modifying HTTP headers. However, you will get tripped up if you try and modify the “Expect: 100-Continue” header on outgoing requests. This is because System.Net will (by default) add this header on outgoing requests.

As a workaround, you can change the default for your application by setting a System.Net static:

System.Net.ServicePointManager.Expect100Continue = false;

One thought on “Suppressing Expect 100-Continue on your Requests

  1. Carl

    Lifesaver, I was going crazy trying to work out why the header was always being added even though I had removed it!!



Leave a Reply

Your email address will not be published. Required fields are marked *