m***@fortissoftware.com
2004-12-23 15:31:54 UTC
I have an itermittant issue in my app when I try to download a file
from our web servers: if VPNed in to our network, the call to
InternetOpenUrl sometimes fails with 0x80072EFE (The connection with
the server was terminated abnormally.) after approx. 190 secs. This
seems to happen on the initial call (we loop and try again) after
creating the VPN connection and then stops happening, but we are
performing other WinInet calls on other threads so that may be from
those.
Here's how I am calling it:
<snip>
dwFlags = INTERNET_FLAG_HYPERLINK|
INTERNET_FLAG_IGNORE_CERT_CN_INVALID|
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP|
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|
INTERNET_FLAG_NO_AUTH|
INTERNET_FLAG_NO_CACHE_WRITE|
INTERNET_FLAG_NO_UI|
INTERNET_FLAG_PRAGMA_NOCACHE|
INTERNET_FLAG_RELOAD;
if (AutoRedirect == FALSE)
dwFlags = dwFlags | INTERNET_FLAG_NO_AUTO_REDIRECT;
RequestHandle = InternetOpenUrl( this->DLFOpenHandle,
W2A(pUrl),
NULL,
0,
dwFlags,
0 );
if (RequestHandle == NULL) {
hr = HRESULT_FROM_WIN32(GetLastError());
if (NumOpenTries > 1) {
goto end;
}
// we failed, try to change the access type
if (globals->dwAccessType == INTERNET_OPEN_TYPE_DIRECT)
dwAccessType = INTERNET_OPEN_TYPE_PRECONFIG;
else
dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
if (this->DLFOpenHandle != NULL) {
// close it !
InternetCloseHandle(this->DLFOpenHandle);
this->DLFOpenHandle = NULL;
}
NumOpenTries++;
goto retry;
}
</snip>
Any help/ideas would be greatly appreciated.
TIA,
Matt
from our web servers: if VPNed in to our network, the call to
InternetOpenUrl sometimes fails with 0x80072EFE (The connection with
the server was terminated abnormally.) after approx. 190 secs. This
seems to happen on the initial call (we loop and try again) after
creating the VPN connection and then stops happening, but we are
performing other WinInet calls on other threads so that may be from
those.
Here's how I am calling it:
<snip>
dwFlags = INTERNET_FLAG_HYPERLINK|
INTERNET_FLAG_IGNORE_CERT_CN_INVALID|
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP|
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|
INTERNET_FLAG_NO_AUTH|
INTERNET_FLAG_NO_CACHE_WRITE|
INTERNET_FLAG_NO_UI|
INTERNET_FLAG_PRAGMA_NOCACHE|
INTERNET_FLAG_RELOAD;
if (AutoRedirect == FALSE)
dwFlags = dwFlags | INTERNET_FLAG_NO_AUTO_REDIRECT;
RequestHandle = InternetOpenUrl( this->DLFOpenHandle,
W2A(pUrl),
NULL,
0,
dwFlags,
0 );
if (RequestHandle == NULL) {
hr = HRESULT_FROM_WIN32(GetLastError());
if (NumOpenTries > 1) {
goto end;
}
// we failed, try to change the access type
if (globals->dwAccessType == INTERNET_OPEN_TYPE_DIRECT)
dwAccessType = INTERNET_OPEN_TYPE_PRECONFIG;
else
dwAccessType = INTERNET_OPEN_TYPE_DIRECT;
if (this->DLFOpenHandle != NULL) {
// close it !
InternetCloseHandle(this->DLFOpenHandle);
this->DLFOpenHandle = NULL;
}
NumOpenTries++;
goto retry;
}
</snip>
Any help/ideas would be greatly appreciated.
TIA,
Matt