Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HttpSendRequest Error : 12002 Internet Timeout

2,566 views
Skip to first unread message

stanne

unread,
May 31, 2004, 3:33:16 AM5/31/04
to

Hi, i'm developing an application which make use of the Wininet API to
download a file from a web server. However, the application runs fine all
most of the machine which i tested except for one laptop running on Win
XP.

This particular machine give me an HttpSendRequest Failed Error of 12002
which is Internet Timeout. I tried setting all the available timeout
settings using "InternetSetOption" to a longer value but to no avail. Can
anyone out there please help and let me know what else i can set to solve
the problem on that machine?

I tested the internet connection should be fine except that it's running
on an VPN which has a sluggish connection.

Brian Combs

unread,
Jun 21, 2004, 3:51:02 PM6/21/04
to
Hello
There are 3 timeouts that you need can set with InternetSetOption.
INTERNET_OPTION_CONNECT_TIMEOUT
INTERNET_OPTION_RECEIVE_TIMEOUT
INTERNET_OPTION_SEND_TIMEOUT
You should make sure that you set each one.

You can also get network trace and\or use debug build of WinInet.DLL to see
where you are getting the timeout.
You can download debug builds of WinInet.Dll from the following location:
ftp://ftp.microsoft.com/PSS/Tools/Developer%20Support%20Tools/WinInet/
You should use the build number that is closest to the version of WinInet
that is on your system.

On Win ME/ Windows 2000/ Windows XP and greater OSs with Windows File
Protection

1. Configure Internet Explorer to use a default Start Page as close to the
page as possible. This eliminates much unnecessary logging that will add
additional size to the output log.
2. Close Internet Explorer as well as any other Internet-based applications
(additional applications that use WININET for connectivity may generate
extra traffic within the log).
3. Navigate to the location of where Internet Explorer is installed.
Typically this is either the \Program Files\Internet Explorer folder or the
\Program Files\Plus!\Microsoft Internet folder.
4. You must have extensions viewable so that the proper extension is
assigned to your file. You can turn on the extensions for all files by
going into the Folder Options from within Windows Explorer and choosing the
View tab and selecting to ‘Show all files’ and to not “Hide extensions of
known file types”.
5. Create a dummy file out of a new text file. Rename the file to the
following filename and extension:

IEXPLORE.EXE.LOCAL

The proper extension for this file is .local If you create this file and
you still have a Notepad icon for the file, re-do step 4 above.
6. Once the file has been created successfully, copy a suitable logging
version of WININET.DLL into the same directory as the file you created in
step 5.
7. Once the logging version of WININET is in place, open a CMD prompt.
Navigate to the location of where Internet Explorer is installed.
Typically this is either the \Program Files\Internet Explorer folder or the
\Program Files\Plus!\Microsoft Internet folder.
8. At the CMD prompt, type the following and hit <enter>:

SET WININETLOG=1

9. Now that the logging environment variable is set, you can now start the
logging by typing the following and hitting <enter>:

IEXPLORE.EXE

10. Internet Explorer should now open on the desktop and navigate to the
Start Page. It is important that you do not close either the CMD window or
Internet Explorer. As soon as Internet Explorer starts navigation, a
WININET.LOG file will be created on the desktop. Do not attempt to open
this log while it is being written to.
11. Recreate the problem. Once the behavior is observed, you can now
safely close Internet Explorer, as well as the CMD window. Logging should
cease. The log file should be zipped up and forwarded to a support
professional that has been trained to read these logs. If the log is too
large to send via Microsoft email (5mb), then it must be placed on the
FTPPSS FTP site (ftp://ftppss.microsoft.com)
12. Very Important: once logging is complete, you should remove the
logging version of WININET.DLL and the IEXPLORE.EXE.LOCAL file. Leaving
the logging version of WININET.DLL in place can affect overall browsing
performance because of the numerous checks written into that version.

TIP: For contrast purposes, it would be advisable to have a log of the
problem occurring and one of a normal condition, if possible. Also, a
Network Monitor packet trace that is taken at the same time as the WININET
log may also be beneficial when attempting to correlate network patterns
during the WININET communication.

NOTE: All of Microsoft’s operating systems from Windows 2000 and forward
support the use of IEXPLORE.EXE.LOCAL. This concept is called Dynamic Link
Library Redirection and documented online at http://msdn.microsoft.com.

NOTE: If you are using a custome WinInet application you can replace
IEXPLORE.EXE.LOCAL with your Application file name. And then run your
application from the command prompt.

NOTE: You can change where the log file is saved by setting environment
variable WininetLogFile, like this:
"set wininetlogfile=c:\temp\MyNewLog.log" with out the quotes.


Thanks
Brian [MSFT]
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "stanne" <zs_...@hotmail.com>
| Newsgroups: microsoft.public.inetsdk.programming.wininet
| Subject: HttpSendRequest Error : 12002 Internet Timeout
| Date: Mon, 31 May 2004 03:33:16 -0400
| Organization: www.talkaboutsoftware.com
| Message-ID:
<2585bcb169c371f1...@localhost.talkaboutsoftware.com>
| X-Newsreader: www.talkaboutsoftware.com
| Content-Type: text/plain;
| X-Complaints-To: ab...@supernews.com
| Lines: 15
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!tdsnet-transit!newspeer.tds.net!sn
-xit-02!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not
-for-mail
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.inetsdk.programming.wininet:11435
| X-Tomcat-NG: microsoft.public.inetsdk.programming.wininet

dgauchet

unread,
Jun 22, 2004, 1:30:36 PM6/22/04
to
Hi,

I've the same problem with my webservice on only 2 machines.
I followed the procedure that you explained below on my machine (which
works!!) and I obtain a log file of 2Ko (for only 1 call to the webservice).
In your message, you wrote that the log file can be very large (several Mo).
So, I'm not sure about the effectiveness of my test.
Do you think it's possible to retire some information from this file (if
yes, I will have to ask to my customers to do this test...)?

Thanks a lot for your help.

Dominique.

"Brian Combs" <Br...@online.microsoft.com> a écrit dans le message de news:
uemOek8...@cpmsftngxa10.phx.gbl...

dgauchet

unread,
Jun 25, 2004, 5:34:25 AM6/25/04
to
Hi,

I probably found the solution to my problem.
Actually, it seems that this problem comes from the firewall of the
antivirus (Stanne, may be you should explore this way...).

However, I'm still interested by knowing how to understand the wininet.dll
work by debuging.

Best regards.

Dominique.


0 new messages