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;即可。或者修改同步异步访问设置,优化性能。

Error CS1061: 'HttpWebRequest'

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-02-04
  • 2022-01-08
  • 2021-10-22
猜你喜欢
  • 2021-05-19
  • 2021-07-21
相关资源
相似解决方案