While working with HttpWebRequest for data crawling, I came across a very weird error,

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

Solution : The System.Net.ServicePointManager class has a static property named Expect100Continue. After setting this value to false, the error stopped.

So, here is what you should set to false,

System.Net.ServicePointManager.Expect100Continue = False