Search

Issue with .NET 2.0/3.0/3.5 web browser control on Vista 64 by SamwiseGalenorn

Closed
as By Design Help for as By Design

0
0
Sign in
to vote
Type: Bug
ID: 426223
Opened: 3/23/2009 11:41:16 PM
Access Restriction: Public
1
Workaround(s)
0
User(s) can reproduce this bug
When I create a .NET program using the WebBrowser control on Vista 64, I believe that the IE 64 bit is used. When I run the same code on Vista 32, it uses the IE 32 bit version.
This causes problems in automating the webbrowser control, or when I try to navigate to sites that have plug ins that won't run in IE 64 bit.
Details (expand)
Product Language
English

Version

Visual Studio 2008 SP1
Operating System
Windows Vista
Operating System Language
English
Steps to Reproduce
Using VS 2008 on Vista 64, create a form that has a web browser control that automatically navigates to http://www.galenorn.com/
The web browser control object will fail to run the flash objects on the site, since IE 64 won't run flash (not on my machine, at least).
Now, do the same on Vista 32. The same web browser control will display the flash objects correctly.

You can run the C# VS2008 .NET 3.5 sample code:
http://www.galenorn.com/gcc/WindowsFormsApplication2.zip
On both Vista 64 and Vista 32, using VS 2008 Pro.
Actual Results
On Vista 64, I believe that the IE 64 is used for the web browser control object by default.
On Vista 32, I believe that the IE 32 is used for the web browser control object by default.
Expected Results
Should the IE 32 bit be used automatically?
If not, how do I force .NET 3.5 (or 2.0/3.0) to use the IE 32 bit version?
TAP Code (if applicable)
 
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
File Name Submitted By Submitted On File Size  
WindowsFormsApplication2.zip (restricted) 3/23/2009 -
Sign in to post a comment.
Posted by SamwiseGalenorn on 3/26/2009 at 11:47 AM
I talked with the people in IE blog, and they corrected the problem.
When I compile the code on Vista 64, I need to change 'Target=Any CPU' to 'Target=x86' in order to force the .NET program to run as a 32 bit application, and use IE 32 bit.
Posted by Microsoft on 3/25/2009 at 7:49 PM
Thanks for your feedback on the .NET Framework!

Unfortunately the issue that you have reported is an issue with Internet Explorer. The WebBrowser control in WinForms is a thin wrapper over IE core. On 64-bits OS, IE 64 is automatically selected while on 32-bits OS, IE 32 is selected instead.

We do not support Internet Explorer through this site. We recommend you try discussing this issue on the IE blog. Please see http://blogs.msdn.com/ie/ for more information.

Thanks and keep the feedback coming.
UIFx Team
Posted by SamwiseGalenorn on 3/25/2009 at 11:46 AM
I should also add another item.
There is a C# automation project for IE usage called WatiN http://watin.sourceforge.net/
In it, it launches a process of IE, captures the window process, then it uses C# code to hit key elements in a web page.
When I run it on Vista 64, IE will launch, but the automation framework refuses to capture the IE window (due to, I believe, IE 64 bit being launched).
When I run it on Vista 32, IE launches and the automation handles the launched process.

I'm guessing that on Vista 64, the automation framework gives priority to 64 bit versions of a program over 32 bit versions.
Posted by Microsoft on 3/24/2009 at 11:42 PM
Thanks for reporting the issue. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.
Posted by Daniel Smith on 3/24/2009 at 2:23 PM
You should be able to set your build target (drop down available on the toolbar) from "Any CPU" to x86 and you're .NET code will default to 32bit.

As far as I know, you can't host a 32-bit process inside a 64-bit app i.e. you can't mix and match. Either your whole app and all it's controls are 32-bit or all 64-bit.