Вопрос

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. (I am not using metro IE ) The same web page hosted on a windows 7 works perfectly fine on IE. Even both OS has same version of IE i.e. 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

Does Microsoft no longer Support hosting Windows form using Webpage?

Edited

Here is the link of .dll file and .html file that i m testing. It is working on windows 7 https://drive.google.com/folderview?id=0B7vQesjAiZYHWmVES29oWEh5WGM&usp=sharing

Это было полезно?

Решение 2

An entry "EnableIEHosting, DWORD = 1" should be made to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework in order to host Windows forms control on WebPage in Windows 8 Environment 64 bit

Другие советы

Microsoft announced that they were dropping support for ActiveX on Windows 8. 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.

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.

Since you haven't stated which language you are using, I am going to provide C# WinForms.

protected void Page_Load(object sender, EventArgs e)
{
    Response.AddHeader("X-UA-Compatible", "requiresActiveX=true");
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top