Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. WebBrowser control error INET_E_DOWNLOAD_FAILURE

WebBrowser control error INET_E_DOWNLOAD_FAILURE

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadminhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    navinavi
    wrote on last edited by
    #1

    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.htm

    NavigateError() 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.

    2 S N 3 Replies Last reply
    0
    • N navinavi

      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.htm

      NavigateError() 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.

      2 Offline
      2 Offline
      224917
      wrote on last edited by
      #2

      Is your browser getting switched to "Work offline" mode?

      -Suhredayan

      1 Reply Last reply
      0
      • N navinavi

        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.htm

        NavigateError() 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.

        S Offline
        S Offline
        Sarath C
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • N navinavi

          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.htm

          NavigateError() 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.

          N Offline
          N Offline
          navinavi
          wrote on last edited by
          #4

          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 :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups