Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: NavigateComplete2, DocumentComplete Events Pass Incorrect URL Parameter


Symptoms

When you try to browse to a Web site and are redirected to a res:// protocol error page, the URL parameter of the NavigateComplete2 and DocumentComplete events, as well as calls to the get_LocationURL method, may reflect the intended destination and not the error page URL.

For example, if you try to browse to http://www.someservername.com/nopagehere.htm and encounter "The page cannot be found" error, the URL parameter of the NavigateComplete2 and DocumentComplete events contains the following URL:
http://www.someservername.com/nopagehere.htm
and not:
res://C:\WINNT\system32\shdoclc.dll/http_404.htm#http://www.someservername.com/nopagehere.htm
Calling get_LocationURL (or accessing the LocationURL property) returns the same value.

This differs from previous versions of Internet Explorer.

↑ Back to the top


Resolution

To retrieve the actual URL, you can use the document.location.href property or IHTMLDocument2::get_location followed by IHTMLLocation::get_href in Microsoft Visual C++.

↑ Back to the top


Status

This behavior is by design and allows you to match up BeforeNavigate2 and NavigateComplete2 or DocumentComplete events more easily.

↑ Back to the top


Properties

Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

↑ Back to the top


Keywords: KB272095, kbwebbrowser, kbprb, kbdhtml

↑ Back to the top

Article Info
Article ID : 272095
Revision : 5
Created on : 9/3/2012
Published on : 9/3/2012
Exists online : False
Views : 151