[英]ActiveX - hosting windows form control on web page using Windows 8
I am using activeX to host a windows form control on a web page but a cross icon is shown instead of that control on windows 8 IE. 我正在使用activeX在网页上托管Windows窗体控件,但显示的是十字图标,而不是Windows 8 IE上的该控件。 (I am not using metro IE ) The same web page hosted on a windows 7 works perfectly fine on IE. (我没有使用Metro IE)Windows 7上托管的同一网页在IE上运行正常。 Even both OS has same version of IE ie 10 甚至两个操作系统都具有相同版本的IE,即10
I am using the following sample code to load control on webpage 我正在使用以下示例代码在网页上加载控件
http://www.codeproject.com/Articles/4953/Simple-way-to-expose-a-NET-WinForm-control-as-an-A http://www.codeproject.com/Articles/4953/Simple-way-to-expose-a-NET-WinForm-control-as-an-A
Does Microsoft no longer Support hosting Windows form using Webpage? Microsoft不再支持使用网页托管Windows窗体吗?
Edited 已编辑
Here is the link of .dll file and .html file that im testing. 这是即时通讯测试的.dll文件和.html文件的链接。 It is working on windows 7 https://drive.google.com/folderview?id=0B7vQesjAiZYHWmVES29oWEh5WGM&usp=sharing 它可以在Windows 7上运行https://drive.google.com/folderview?id=0B7vQesjAiZYHWmVES29oWEh5WGM&usp=sharing
Microsoft announced that they were dropping support for ActiveX on Windows 8 . 微软宣布将放弃对Windows 8上ActiveX的支持 。 As a temporary way to allow support for web sites that require ActiveX, you can add an HTTP header to tell IE on Win8 to allow use of ActiveX. 作为支持需要ActiveX的网站的一种临时方法,可以添加HTTP标头以告知Win8上的IE允许使用ActiveX。
You need to add this header: 您需要添加以下标头:
X-UA-Compatible: requiresActiveX=true
This can be accomplished by settings on IIS or adding code to your pages . 这可以通过在IIS上进行设置或向页面添加代码来完成 。
Since you haven't stated which language you are using, I am going to provide C# WinForms. 由于您尚未说明要使用的语言,因此我将提供C#WinForms。
protected void Page_Load(object sender, EventArgs e)
{
Response.AddHeader("X-UA-Compatible", "requiresActiveX=true");
}
应该在HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Wow6432Node \\ Microsoft.NETFramework中创建一个条目“ EnableIEHosting,DWORD = 1”,以便在Windows 8环境64位中的WebPage上承载Windows窗体控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.