加载.NET用户控件在IE中使用.NET 4.0 [英] Loading .NET UserControls in IE with .NET 4.0

查看:241
本文介绍了加载.NET用户控件在IE中使用.NET 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧的应用程序,其中有被用作在IE浏览器加载网页的ActiveX一个用户控件。 .NET 4.0之前,有安全策略和创建code组等一个MMC控制台好像是都没有了与.NET 4.0。

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.

我在想,如果有人可以给我如何使其作品在.NET 4.0更新我的用户项目的一些线索。我一直在运行一些测试,他们都不上班。事实上,我发现,如果我compilint之前更新我的用户的.NET版本为4.0,它甚至不会被添加到GAC下载区。它会下载(使用小提琴手进行测试),但它根本不会被添加到GAC的下载区。设置.NET平台的版本3.5或以下,这意味着该dll被添加到GAC但它仍然是从网页(即工作过的老JS code无法使用口口声声说,它不能 找到对象ÿ成员X)。

I was wondering if someone could give me some clues on how to update my UserControl project so that it works against .NET 4.0. I've been running some tests and none of them seem to work. In fact, I've noticed that if I update the .NET version of my UserControl to 4.0 before compilint it, it won't even be added to the GAC download area. It gets downloaded (used fiddler to test it) but it simply isn't added to the GAC's download area. Setting the .NET platform version to 3.5 or below, means that the dll is added to the GAC but it's still unusable from the web page (the old JS code that worked before keeps saying that it cannot find member X on object Y).

所以,任何人都可以点我的方向是正确的?什么我需要做的在.NET 4.0中加载.NET用户控件在Internet Explorer?

So, can anyone point me to the right direction? What do I need to do in .NET 4.0 to load a .NET UserControl in Internet Explorer?

感谢。

推荐答案

现在默认禁止(由于V4或者V4.5)在IE浏览器主机控制。见在Web应用程序 MSDN文章

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

在64位密钥是一个固定的对我来说,使用编译为X32。净V3.5 SP1器上的Win7(64位)运行IE8(X32)。

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.

这篇关于加载.NET用户控件在IE中使用.NET 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆