Microsoft KB Archive/939204

= 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 =

Article ID: 939204

Article Last Modified on 7/3/2007

-

APPLIES TO


 * Microsoft Internet Explorer 6.0

-



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.</li> You use the application to load a Web page in the WebBrowser control.</li></ul>

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.

<div class="cause_section">

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.

<div class="resolution_section">

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.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
For more information about Aximp.exe, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/8ccdh774(VS.80).aspx

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

Keywords: kbexpertiseadvanced kbtshoot kbprb KB939204

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.