2017.07.23
错误信息:
Program.cs(26,66): error CS1061: 'HttpWebRequest'does not contain a definition for 'GetResponse' and no extension method'GetResponse' accepting a first argument of type 'HttpWebRequest' could befound
(are you missing a using directive or anassembly reference?)
因为版本更新问题,错误原因是:没有request.GetResponse()方法;修改成request.GetResponseAsync().Result;即可。或者修改同步异步访问设置,优化性能。