When I try to POST to a URL it results in the following exception:
The remote server returned an error: (417) Expectation Failed.
If you are using "HttpClient", and you don't want to use global configuration to affect all you program you can use:
HttpClientHandler httpClientHandler = new HttpClientHandler();
httpClient.DefaultRequestHeaders.ExpectContinue = false;
I you are using "WebClient" I think you can try to remove this header by calling:
var client = new WebClient();
client.Headers.Remove(HttpRequestHeader.Expect);