Microsoft KB Archive/272095

= PRB: NavigateComplete2, DocumentComplete Events Pass Incorrect URL Parameter =

Article ID: 272095

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q272095



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 &quot;The page cannot be found&quot; 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.



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



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

