Connecting to from server programatically is very slow

SoonDead asked:

There is a Windows Server Standard SP2 (possibly the server edition of Vista, as it is build 6.0.6002).

There are a few webapps running on the IIS server. A few of them uses ReCaptcha validation. The DLL they use to validate is making POST request to

This request worked for 1-2 years without any problems on any configuration I have ever tried, but now it takes around 22 seconds, which is more than enough time for the program to time out.

I have made a mininmal test case which opens a request writes some post data, and writes out the result and tested it from a few locations.

The response is almost instantaneous on most locations only this one server struggles with getting a response in time.

Might be related to this issue:

Upon pinging the address. I gets resolved as IPv6, but from other locations it simply resolved as IPv4. When using the -4 parameter I can ping the IPv4 address fine.

Could this be a DNS issue?
How can I check for the bottleneck that slows the request down?
Should I contact the DNS provider?

My answer:

The site you’re trying to connect to is dual stack IPv4/IPv6, but your server doesn’t yet have native IPv6 available. It’s therefore trying to use an IPv6 tunnel, which is failing for whatever reason.

To resolve the problem, disable IPv6 tunneling technologies (Teredo, 6to4 and ISATAP):

netsh int ipv6 isatap set state disabled
netsh int ipv6 6to4 set state disabled
netsh int teredo set state disabled

Don’t just disable IPv6 entirely; this will cause you problems later when you roll out native IPv6 into your datacenter.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.