Loading .NET UserControls in IE with .NET 4.5

There is a similar question: Loading .NET UserControls in IE with .NET 4.0 This question is essentially the same, but for .NET 4.5

That question starts with: I've got a legacy app where there's a UserControl which is used as an activex in a web page loaded in IE. Before .NET 4.0, there were security policies and a MMC console for creating code groups, etc. It seems like that is all gone with .NET 4.0.

After installing .NET 4.5 it seems the workaround is no longer working, and that IE is unable to load any usercontrol. My fear is that this feature is removed altogether. In that case we have some serious rewriting to do before our users can install .NET 4.5

Some notes:

  • Everything was working perfectly fine with the .NET 4.5 RC. 8-(
  • Fuslogvw (Assembly Binding Log Viewer) Behaves as expected before upgrade, but after upgrade it is not logging anything. (And usercontrol is not being loaded.)
  • In production the controll will have to run with full trust, but all my testing has been done with a simple control that does not require this
  • Anybody who has sugestions or information regarding this feature?



    This is documented in the .NET 4.5 Application Compatibility Page on MSDN: http://msdn.microsoft.com/en-us/library/hh367887.aspx . Hosting managed controls inside IE is no longer supported out of the box (see half-way down under "Web Applications"):

    Feature: Managed browser hosting controls from the .NET Framework 1.1 and 2.0

    Change: Hosting these controls is blocked in Internet Explorer.

    Impact: Internet Explorer will fail to launch an application that uses managed browser hosting controls. The previous behavior can be restored by setting the EnableLegacyIEHosting value of the registry subkey HKLM/SOFTWARE/MICROSOFT/.NETFramework to 1.

    Unfortunately, the information on the registry key appears to be incomplete and wrong:

    • The setting is actually called "EnableIEHosting".

    • It must be located either in the HKCU Hive: HKCU\SOFTWARE\Microsoft\.NETFramework

    • or the HKLM hive, but under different paths, depending on the 32/64bit type of Windows:
      • 32-bit System: HKLM\SOFTWARE\MICROSOFT\.NETFramework
      • 64-bit System: HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework

    This was tested on both Windows Server 2008R2 and Windows 8.

    Need Your Help

    How do I create dynamic variable names inside a loop?

    javascript jquery google-maps

    I'm working on an ajax google maps script and I need to create dynamic variable names in a for loop.

    Clean Architecture vs Onion Architecture

    architecture onion-architecture clean-architecture

    I have been reading up on the Onion Architecture and today I found out about Uncle Bob's Clean Architecture.