今天偶然发现修改host后对成功解析的域名不生效,看到这篇文章才解惑,特此记录一下

需要将HttpWebRequest  KeepAlive 属性设置为false 不保持长连接

另外需要修改DNS缓存时间 

ServicePointManager.DnsRefreshTimeout =0;

https://stackoverflow.com/questions/7277582/how-do-i-clear-system-net-client-dns-cache

相关文章:

  • 2021-09-15
  • 2022-12-23
  • 2021-09-07
  • 2021-11-05
  • 2021-10-19
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-11-18
  • 2021-11-20
  • 2021-08-09
  • 2021-08-22
  • 2021-11-24
相关资源
相似解决方案