I have taken ownership of an application which is a .net win forms application which hosts a System.Windows.Forms.WebBrowser. When the application launches it makes a http request to load a xap file. I immediately see “install silverlight” icon and on clicking get:
“Microsoft Silverlight cannot be used in browsers running in 64 bit mode”.
The app was written initially on a 32 bit machine although I have a 64 bit machine.
Any ideas what I need to tweak to get this running?
JD
The “bitness” of the machine on which a .NET application is build has no impact on the “bitness” of the final application. By default a .NET EXE will run in either 32 or 64 bits depending on the operating system it is running on at the time.
Hence on a 64bit system a typical .NET application will run in 64bit process. You can change that behaviour at compile time by changing the build options platform target to x86 to force the app to always run as a 32bit application.
This is probably what you will want to do if hosting a silverlight app is a critical or common thing you need to do.
There is also an SDK tool called “CoreFlags” which can use to tweak an existing .NET .exe to ensure it runs as 32 bit:-