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.

A Web page loads in Internet Explorer 6 instead of in the WebBrowser control when you use an application that hosts the COM version of the WebBrowser control


View products that this article applies to.

Symptoms

Consider the following scenario:
You have a computer that has Microsoft Internet Explorer 6 installed.
You use Microsoft Visual Studio .NET 2005 or Microsoft Visual Studio .NET 2003 to create an application that hosts the Component Object Model (COM) version of the Microsoft WebBrowser control.

Notes
The WebBrowser control is based on the Shdocvw.dll component.
The Shdocvw.dll component is in the following folder:
%systemroot%\System32
You use the ActiveX Control Importer tool (Aximp.exe) to generate the interop assemblies for the Shdocvw.dll component.
You add references to the application project.

Note The references are based on the interop assemblies.
You use the references to add the WebBrowser control to the application.
You use the application to load a Web page in the WebBrowser control.
In this scenario, you may receive a dialog box. The dialog box contains an Open button and a Save button. If you click Open, the Web page is loaded in Internet Explorer 6 instead of in the WebBrowser control.

Note This problem does not occur on a computer that has Windows Internet Explorer 7 installed.

↑ Back to the top


Cause

This problem occurs because two Shdocvw.dll files exist on the computer.

When you use Aximp.exe to generate the interop assemblies for the Shdocvw.dll component that is in the %systemroot%\System32 folder, Aximp.exe generates an interop assembly that is named Shdocvw.dll. This interop assembly is located in the executable directory of the application. However, the original Shdocvw.dll component is still present in the %systemroot%\System32 folder. Therefore, two Shdocvw.dll components exist.

This problem occurs if the following conditions are true:
When you start the application, the application loads the Shdocvw.dll component that is in the executable directory.
The application then loads the Shdocvw.dll component that is in the %systemroot%\System32 folder.

↑ Back to the top


Resolution

To resolve this problem, follow these steps:
1. Use an IDE to regenerate the interop assemblies for the Shdocvw.dll component.
2.Redeploy the application.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

For more information about Aximp.exe, visit the following Microsoft Web site: For more information about this problem, click the following article numbers to view the articles in the Microsoft Knowledge Base:
306718 Running Tlbimp.exe or Aximp.exe on Shdocvw.dll in the users Documents and Settings folder causes Internet Explorer and Windows Explorer to stop functioning
325618 Name collision in the ActiveX wrapper class

↑ Back to the top


Keywords: KB939204, kbprb, kbtshoot, kbexpertiseadvanced

↑ Back to the top

Article Info
Article ID : 939204
Revision : 1
Created on : 7/3/2007
Published on : 7/3/2007
Exists online : False
Views : 309