WebBrowser control error INET_E_DOWNLOAD_FAILURE
-
I have implemented a small web server inside a dialog application that host the web browser control. On a good scenario, this is what happens: I pass the url to the webbrowser control and it downloads all files from my server and displays it correctly. Something like:
CString navigateTo; navigateTo.Format((TEXT("http://127.0.0.1:%d/%s")), m\_nListeningSocketPort, GetFileName() ); try { m\_IExplorer.Navigate( navigateTo, 0, 0, 0, 0 ); } ...
explorer then gets all the files needed from the web server and all is ok. Then I disconnect from internet and from that point on internet explorer doesn't download anything. It doesnt even try to contact the server! Events go like this:
http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateErrorWebbrowser():: URL: http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser():: URL: res://ieframe.dll/dnserrordiagoff_webOC.htm#http://127.0.0.1:52953/some\_page.htm
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateComplete2Webbrowser():: URL: http://127.0.0.1:52953/some\_page.htmNavigateError() reports INET_E_DOWNLOAD_FAILURE. Can anyone explain what's going on? How can I force the web browser to contact to local web server? I implemented additinal test to verify server is up and running, and it's all good.
-
I have implemented a small web server inside a dialog application that host the web browser control. On a good scenario, this is what happens: I pass the url to the webbrowser control and it downloads all files from my server and displays it correctly. Something like:
CString navigateTo; navigateTo.Format((TEXT("http://127.0.0.1:%d/%s")), m\_nListeningSocketPort, GetFileName() ); try { m\_IExplorer.Navigate( navigateTo, 0, 0, 0, 0 ); } ...
explorer then gets all the files needed from the web server and all is ok. Then I disconnect from internet and from that point on internet explorer doesn't download anything. It doesnt even try to contact the server! Events go like this:
http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateErrorWebbrowser():: URL: http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser():: URL: res://ieframe.dll/dnserrordiagoff_webOC.htm#http://127.0.0.1:52953/some\_page.htm
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateComplete2Webbrowser():: URL: http://127.0.0.1:52953/some\_page.htmNavigateError() reports INET_E_DOWNLOAD_FAILURE. Can anyone explain what's going on? How can I force the web browser to contact to local web server? I implemented additinal test to verify server is up and running, and it's all good.
-
I have implemented a small web server inside a dialog application that host the web browser control. On a good scenario, this is what happens: I pass the url to the webbrowser control and it downloads all files from my server and displays it correctly. Something like:
CString navigateTo; navigateTo.Format((TEXT("http://127.0.0.1:%d/%s")), m\_nListeningSocketPort, GetFileName() ); try { m\_IExplorer.Navigate( navigateTo, 0, 0, 0, 0 ); } ...
explorer then gets all the files needed from the web server and all is ok. Then I disconnect from internet and from that point on internet explorer doesn't download anything. It doesnt even try to contact the server! Events go like this:
http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateErrorWebbrowser():: URL: http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser():: URL: res://ieframe.dll/dnserrordiagoff_webOC.htm#http://127.0.0.1:52953/some\_page.htm
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateComplete2Webbrowser():: URL: http://127.0.0.1:52953/some\_page.htmNavigateError() reports INET_E_DOWNLOAD_FAILURE. Can anyone explain what's going on? How can I force the web browser to contact to local web server? I implemented additinal test to verify server is up and running, and it's all good.
Two questions. if you're dialup to connect internet? Check local webserver (like IIS or any other local webserver) is configured. also as said in the previous answer, check if it's enabled to work offline to get the offline content. else if you're using proxy, in the internet settings->LAN settings, exclude proxy from local address.
-Sarath.
My blog - Sharing My Thoughts
Rate the answers and close your posts if it's answered
-
I have implemented a small web server inside a dialog application that host the web browser control. On a good scenario, this is what happens: I pass the url to the webbrowser control and it downloads all files from my server and displays it correctly. Something like:
CString navigateTo; navigateTo.Format((TEXT("http://127.0.0.1:%d/%s")), m\_nListeningSocketPort, GetFileName() ); try { m\_IExplorer.Navigate( navigateTo, 0, 0, 0, 0 ); } ...
explorer then gets all the files needed from the web server and all is ok. Then I disconnect from internet and from that point on internet explorer doesn't download anything. It doesnt even try to contact the server! Events go like this:
http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateErrorWebbrowser():: URL: http://127.0.0.1:52953/some\_page.htm
BeforeNavigate2Webbrowser():: URL: res://ieframe.dll/dnserrordiagoff_webOC.htm#http://127.0.0.1:52953/some\_page.htm
DownloadBeginWebbrowser()
DownloadBeginWebbrowser()
NavigateComplete2Webbrowser():: URL: http://127.0.0.1:52953/some\_page.htmNavigateError() reports INET_E_DOWNLOAD_FAILURE. Can anyone explain what's going on? How can I force the web browser to contact to local web server? I implemented additinal test to verify server is up and running, and it's all good.
Thnx for the answers, the server works fine. The problem was in the way ie control works when you put it to offline with .put_Offline(TRUE). Then it never tries to go online. But when you set the control to online and check the "Work Offline" option in IE, then the control asks to go online. Just didn't occur to me it works that way... Needed just a good night's sleep :)