Fixing “The remote server returned an error: (417) Expectation Failed”

After failing at breakpointing and debugging request and response headers I almost snapped Wireshark to my connection to determine why I was getting an WebException of “The remote server returned an error: (417) Expectation Failed“. A little searching took me to this site with the solution. The simple solution is to set the static property System.Net.ServicePointManager.Expect100Continue to False before making your call.

Documentation of that property can be found here.

  • Fred Richardson

    You have just saved me. I have spent hours and hours trying to find a solution to this problem. Many many thanks Chris

  • Le My Canh

    System.Net.ServicePointManager.Expect100Continue = False.
    Thankyou very much.

  • You saved the class. Thank you for your help.