当系统不使用 VPN 时,C# 4.5.2 框架 HttpClient.GetAsync() 方法在 Windows 10 上运行良好。
连接 VPN 后,对同一地址的 HttpClient.GetAsync() 调用只会阻塞,直到超时。 Edge 和 Chrome 访问同一地址都没有问题。
有没有办法看到正在发生的事情? HttpClient 有何不同之处?
Update:通过致电获得一些有趣的线索Dns.GetHostEntry()
。没有VPN
此调用仅返回所有可以连接到的 IPv4 地址。连接 VPN 客户端Dns.GetHostEntry()
在列表顶部返回了其他 IPv6 地址。与所有 IPv6 地址的连接均超时,但所有 IPv4 地址仍工作正常。现在有没有一种方法可以在不尝试连接的情况下找出哪些地址有效,哪些地址无效?
In my experience, this sounds like a VPN / firewall issue to me. One quick thing to toggle in windows is under you VPN adapter properties, try unchecking "Use default gateway on remote network" - I know it sounds like a long shot but have had this problem in the past...
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)