Loading .NET UserControls in IE with .NET 4.0

前端 未结 2 614
误落风尘
误落风尘 2020-12-17 04:37

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

2条回答
  •  情话喂你
    2020-12-17 05:02

    Hosting controls in IE is now blocked by default (as of v4 or v4.5). See MSDN article under 'Web Applications'.

    Fortunately it is super-easy to re-enable the functionality with these reg keys:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
    "EnableIEHosting"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework]
    "EnableIEHosting"=dword:00000001
    

    The x64 key was the one that fixed it for me, running IE8 (x32) on Win7 (x64) using a .Net v3.5 SP1 control compiled for x32.

提交回复
热议问题