So, I decided to instead to write the code to do the same thing
URLDownLoadToFile() does. I instantiate an CInternetSession(), and then do
a OpenURL() to get to the desired URL, and then a Read() to transfer the
data in the URL to a local file. Well, the same thing happened. It works
in a console application, but hangs on the DLL version. However, I did
discover that it really doesn't hang in the DLL, it just takes up to three
minutes before it finally opens the URL (sometimes generating a timeout
CInternetException, other times not), and then it can read the URL with no
problem.
(It's possible that in my previous attempt URLDownLoadToFile() would have
finally connected, I just never waited long enough.)
Debugging the DLL and stepping through CInternetSession::OpenURL() shows
the function that's having the problem is InternetOpenURL().
Anyone run across this and have any ideas what's going on?
Why would it work in a console application but not an ISAPI DLL?
I've tried this both with Windows NT with IIS and Windows 95 with the
Personal Web Server (and any hint on how to debug an ISAPI DLL on W95 with
the PWS would be great. My access to the NT machine is limited).
The URLs I was trying to download were both on the local machine running
the web server as well as remote ISPs, and I could get to those URLs with
a browser.
Thanks.
(If you post a reply, please email me as well)
Doug Rudoff
do...@arkspace.com
http://www.planetoasis.com
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
I'm assuming that you're using VC 4.2b. I've been debugging something
similar on NT. What I do is set the executable to debug as the program
name. In the NT case, it's "inetinfo" with the command line parameter
"-e w3svc". This starts the debugger and I can debug my dll with no
problems.
I've noticed the same thing as you with the delays, but it does not
happen to me all the time. If you find out, could you please post the
solution?
> So, I decided to instead to write the code to do the same thing
> URLDownLoadToFile() does. I instantiate an CInternetSession(), and then
do
> a OpenURL() to get to the desired URL, and then a Read() to transfer the
> data in the URL to a local file. Well, the same thing happened. It works
> in a console application, but hangs on the DLL version. However, I did
> discover that it really doesn't hang in the DLL, it just takes up to
three
> minutes before it finally opens the URL (sometimes generating a timeout
> CInternetException, other times not), and then it can read the URL with
no
> problem.
>