Discussion:
1 minute hang/delay after using WININET calls
(too old to reply)
Jon
2004-06-09 09:11:24 UTC
Permalink
I'm experiencing a problem when using WININET calls for FTP. After
making use of InternetOpen() and then an InternetConnect() call for
FTPing, whether the connection succeeds or not, the calling
application will then hang for 1 minute. This behaviour occurs both
in a C++ DLL when a call to FreeLibrary() is made, and in a VB
application when the application is closed. In both cases,
InternetCloseHandle() calls are being made to close the handle - I
would have thought this would perform any necessary clean up. Any
ideas what may be causing this?
Brian Combs
2004-06-17 14:51:13 UTC
Permalink
Hello
You may be running into the following problem.

*** Problem Description ***
WinInet application hangs for 60 secs on shutdown.
On the stack you see a call to FreeAutoProxyInfo()
This function is explicitly calling WaitForSingleObject() with 60000.


<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
<>
*** Resolution ***

Customer did not have a proxy, but had "Automatically detect settings" in
IE.
Once we unselected that, the problem did not repro.
This is by design. There is a pending autoproxy processing request and this
thread
will wait for 60 seconds before it terminates. The app is tyring to unload
wininet.dll, so wininet tries to close down the autoproxy thread, which in
turn
waits 60 seconds for worker thread to finish its work.

Thanks
Brian [MSFT]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: ***@hotmail.com (Jon)
| Newsgroups: microsoft.public.inetsdk.programming.wininet
| Subject: 1 minute hang/delay after using WININET calls
| Date: 9 Jun 2004 02:11:24 -0700
| Organization: http://groups.google.com
| Lines: 9
| Message-ID: <***@posting.google.com>
| NNTP-Posting-Host: 128.87.251.170
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1086772285 12608 127.0.0.1 (9 Jun 2004
09:11:25 GMT)
| X-Complaints-To: groups-***@google.com
| NNTP-Posting-Date: Wed, 9 Jun 2004 09:11:25 +0000 (UTC)
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!fr.ip.ndsoftware.net!proxad.net!postnews1.google.
com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.inetsdk.programming.wininet:11448
| X-Tomcat-NG: microsoft.public.inetsdk.programming.wininet
|
| I'm experiencing a problem when using WININET calls for FTP. After
| making use of InternetOpen() and then an InternetConnect() call for
| FTPing, whether the connection succeeds or not, the calling
| application will then hang for 1 minute. This behaviour occurs both
| in a C++ DLL when a call to FreeLibrary() is made, and in a VB
| application when the application is closed. In both cases,
| InternetCloseHandle() calls are being made to close the handle - I
| would have thought this would perform any necessary clean up. Any
| ideas what may be causing this?
|
Jon
2004-06-18 11:35:00 UTC
Permalink
Hi,

Thanks for your reponse. So the answer is to disable the 'Auto-detect' in IE?
Brian Combs
2004-06-30 20:27:58 UTC
Permalink
Hello
Yes or live with the delay. You can also try and just change it for your
app.
226473 HOWTO: Programmatically Query and Set Proxy Settings Under Internet
http://kb/article.asp?id=Q226473

Thanks
Brian [MS]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: ***@hotmail.com (Jon)
| Newsgroups: microsoft.public.inetsdk.programming.wininet
| Subject: Re: 1 minute hang/delay after using WININET calls
| Date: 18 Jun 2004 04:35:00 -0700
| Organization: http://groups.google.com
| Lines: 3
| Message-ID: <***@posting.google.com>
| References: <***@posting.google.com>
<***@cpmsftngxa10.phx.gbl>
| NNTP-Posting-Host: 128.87.251.169
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1087558501 15705 127.0.0.1 (18 Jun 2004
11:35:01 GMT)
| X-Complaints-To: groups-***@google.com
| NNTP-Posting-Date: Fri, 18 Jun 2004 11:35:01 +0000 (UTC)
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!p
ostnews2.google.com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.inetsdk.programming.wininet:11481
| X-Tomcat-NG: microsoft.public.inetsdk.programming.wininet
|
| Hi,
|
| Thanks for your reponse. So the answer is to disable the 'Auto-detect'
in IE?
|

Loading...