Discussion:
InternetOpenUrl fails over VPN?
(too old to reply)
m***@fortissoftware.com
2004-12-23 15:31:54 UTC
Permalink
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
Brian Combs
2004-12-28 20:46:02 UTC
Permalink
Hello
Sounds like the connection is being reset. You can get a wininet log and
network trace to see what is happening.
884931 How to use the debug version of the Wininet.dll file for Internet
http://support.microsoft.com/?id=884931

Thanks
Brian [MSFT]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: ***@fortissoftware.com
| Newsgroups: microsoft.public.inetsdk.programming.wininet
| Subject: InternetOpenUrl fails over VPN?
| Date: 23 Dec 2004 07:31:54 -0800
| Organization: http://groups.google.com
| Lines: 63
| Message-ID: <***@z14g2000cwz.googlegroups.com>
| NNTP-Posting-Host: 66.118.139.2
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1103815920 2945 127.0.0.1 (23 Dec 2004
15:32:00 GMT)
| X-Complaints-To: groups-***@google.com
| NNTP-Posting-Date: Thu, 23 Dec 2004 15:32:00 +0000 (UTC)
| User-Agent: G2/0.2
| Complaints-To: groups-***@google.com
| Injection-Info: z14g2000cwz.googlegroups.com; posting-host=66.118.139.2;
| posting-account=bc2LNgwAAACYAgekuorzLTK2zJopBK8m
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fas
twebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.c
om!z14g2000cwz.googlegroups.com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.inetsdk.programming.wininet:11932
| X-Tomcat-NG: microsoft.public.inetsdk.programming.wininet
|
| 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
|
|

Loading...