Discussion:
wininet and timeout
(too old to reply)
River Ross
2004-09-08 19:21:39 UTC
Permalink
Is there some way to configure in the environment\Windows\etc. the default
http connect timeout value for wininet? (I believe what the documentation
calls INTERNET_OPTION_CONNECT_TIMEOUT)

I have an MFC app that's already live so no programmatic solution is
possible. A user is reporting network reliability issues that make them
want to up the connection time out however my app doesn't expose any way to
adjust this option and my code is just running off of whatever is default
(not sure if that's a constant hardcoded into MS API or in the windows
registry somewhere etc.)
Stephen Sulzer
2004-09-09 04:30:56 UTC
Permalink
This post might be inappropriate. Click to display it.
River Ross
2004-09-09 04:49:26 UTC
Permalink
Good tips I will research these further. Thank you for your assistance, I
would have never stumbled across this info.
Post by Stephen Sulzer
WinInet's default connect timeout is supposedly 5 minutes--although I am not
certain it is actually in effect. In any case, WinInet's connect timeout is
not configurable via the registry, it can only be set programmatically.
There are a couple TCP/IP configuration registry settings that may be able
to help. However, changing these registry settings will affect all web-based
applications, not just those that use WinInet. So use caution adjusting
these settings.
From KB article 314053, the relevant settings are
"TcpMaxConnectRetransmissions" and "TcpMaxDataRetransmissions". Both values
are set on the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
registry key.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;314053
TcpMaxConnectRetransmissions affects the TCP/IP stack's connect timeout. For
some additional information, see
http://www.sanx.org/tipShow.asp?articleRef=35.
I wouldn't consider hacking these registry keys a long-term solution, just a
temporary workaround until you can distribute an updated version of your
app.
Stephen
Continue reading on narkive:
Loading...