none
How to change "Internet Explorer cannot display the webpage" error messages

    Question

  • Hi everyone,

    I was wondering if anyone can point me towards how to change the "Internet Explorer cannot display the webpage" error message on IE7 running on a standard PC.


    As some background, I'm working on a wireless tablet that may have dropped internet connections, and instead of showing the standard error page, I've created my own error messages that provides a few quick troubleshooting steps (restart tablet, reconnect, etc.), which is infinitely more useful than the standard IE7 error page.


    I've already found the AboutURLs registry edits, and have not been successful thus far, so I'm really stuck at this point. :-( 
    Any help is greatly appreciated - thank you!


    ~ Steven
    Tuesday, April 29, 2008 12:26 AM

All replies

  • Hello,

     

    I've run into the same problem, I am also working with a tablet pc that sometimes drops a connection. I tried to edit the ieframe.dll.mui file, but this only messed up every error page on IE. Some help would be great.

     

    Nieko

     

    Friday, May 23, 2008 7:30 AM
  • You must indeed modify the ieframe.dll.mui file but not with a simple text editor. You need a ressource editor that can open library files and do the modifications in a "cleaner" way.

    Start by making a copy of the original file in case you mess things up and then open the library with your ressource editor.
    Once inside ieframe.dll.mui you must open the "23" sub-key and there you will see all the various ressources that can be modified. The messages you are looking to change is DNSERROR.HTM. Just copy/paste the proper HTML message you want and recompile/save the library. There is also DNSERRORDIAGOFF.HTM and DNSERRORDIAGOFF_WEBOC.HTM whose purpose I'm not certain of but I changed them as well just in case.

    Please note that you may find multiple instances of the ieframe.dll.mui file on your system (in system32/dllcache and system32/en-US among others) you'll want to change these as well.

    I hope this helps!

    tohox
    Tuesday, July 15, 2008 6:40 PM
  • void Explorer_BeforeNavigate2(object pDisp, ref object URL, ref object Flags, ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel)

            {

                if (URL.ToString().Contains("res://ieframe.dll/dnserror.htm#"))

                {

                    Cancel = true;

                    //Now navigate to your custom page

     

                }

     

            }

    Wednesday, July 16, 2008 6:09 PM
  • What can I do with that code, or how can I use it. Please help

     

    Friday, July 18, 2008 1:35 PM
  • The code given by cablehead is to be used if you are developing your own browser .Net application based on the WebBrowser component. The WebBrowser component is in fact Internet Explorer rendered accessible to .Net applications.

     

    The code checks for the presence of "res://ieframe.dll/dnserror.htm" in the URL. This file is called whenever IE can't resolve the URL through DNS and displays the "Internet Exploirer cannot display the webpage" message. If the DNSERROR.HTM file is indeed being called his code cancels loading the page and alternatly loads another one.

     

    If you are not a .Net developer and you are simply looking to disable the message on a one time basis I'd suggest modifying the "ieframe.dll.mui" instead.

     

    regards,

     

    tohox

    Friday, July 18, 2008 2:35 PM
  • Hey cablehead!

     

    I tried your code but with no luck.

    The BeforeNavigate2 event doesn't fire when navigating to an error page ("res://ieframe.dll/dnserror.htm#").

    It's ok though with all other navigations.

     

    Can you help me make it work?

    Can you pls send me a sample project to learn from?

     

    Thanks and best regards,

    Dekel.

     

    Monday, October 06, 2008 10:16 AM
  • As an alternative, you may be able to check for that URL on the DocumentComplete event of IE.  This only fires when a page completes rendering, and the DNS error page should fire it off.

    Sunday, October 12, 2008 2:56 AM
  • What would the equivalent file name be for IE6?  I found shdoclc.dll and I found DNSERROR.HTM but when I make a change to that DLL it doesn't show on my DNSERROR screen.  Is there a different file name?  Is there a different way to do this with IE6?

    Wednesday, November 12, 2008 12:20 AM
  • Im in the same situation here, i've tried editing the ieframe.dll.mui file but i cannot get it to work, it starts to feel like some old data is cached in IE.

    I can get to my custom error message 'manually' by entering res://ieframe.dll.mui/dnserror.htm (Observe ieframe.dll.mui)

    Or is there an additional step to take after i have modified the ieframe.dll.mui file ?

    brgrds

    Monday, November 07, 2011 7:17 PM
  • What would the equivalent file name be for IE6?  I found shdoclc.dll and I found DNSERROR.HTM but when I make a change to that DLL it doesn't show on my DNSERROR screen.  Is there a different file name?  Is there a different way to do this with IE6?
    I believe we've done this with IE6 manipulating the xpsp2res.dll.  Anyone done this with IE8?
    • Edited by BLStuart Thursday, January 05, 2012 4:48 PM
    Thursday, January 05, 2012 4:47 PM
  • I have the same problem as the earlier requester, with the need to replace the dnserror.htm page with a custom page.  I have edited the ieframe.dll.mui file using resource hacker and have confirmed that the changes are there.  However,  whenever I test it by turning off my computers internet connection and requesting a web page in IE, I get the original page. If I look at ieframe.dll.mui using Visual Studio it has an old page.  I found a way to get the full path to the page but the page doesn't exist where the path suggests.  (Under user/myname/appdata...) 

    I really need to resolve this and all help is greatly appreciated.

    John

    Thursday, March 15, 2012 9:14 PM
  • ur a pro hacker so give me the co0des

    hack code*15225489*                              ok                                 **15698722859**
    Sunday, April 22, 2012 8:41 PM
  • It appears that you did not even understand the question. The thread starter wants to write an IE addon to customize the "cannot open this page" error message, not trying to solve the error for the user.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    Monday, May 07, 2012 10:43 AM