I have a web page that calls a .Net assembly. Everything works fine in Windows XP and IE7. The relevant parts:
<html>
<head>
<script language="javascript" type="text/javascript">
function doScript() {
myControl1.Go("value1","value2");
}
</script>
</head>
<body onload="javascript:doScript();">
<object id="myControl1" name="myControl1"
codebase="../cabs/myassembly.dll"
classid="../cabs/myassembly.dll#MyNs.MyClass"
width="1" height="1"></object>
</body>
</html>
I cannot get this to work in Windows 7 with IE8. Some notes:
localhost
right now.
http://1.2.3.4/...
) and that IP is in the "Trusted Sites" of IE.http://localhost/...
and localhost
is in the "Trusted Sites" of IE.http://localhost/cabs/myassembly.dll
.Does anyone have any ideas to try to get this to work or troubleshoot where the problem is at?
Disclaimer: Yes, I realize it is 2012, and the world has moved past IE7, IE8, ActiveX, etc. Let's just say we're a little bit behind technologically. This is the problem I have to solve; upgrading to modern solutions isn't going to be an option.
UPDATE: I did get it to work in a Windows XP VirtualBox running IE8. So it appears the problem is specific to Windows 7. It fails both on my local machine and a VirtualBox running Windows 7, IE8.
This was solved by adding the registry key answered on "Loading .NET UserControls in IE with .NET 4.0" (even though this was a 2.0 control)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"EnableIEHosting"=dword:00000001
I'm not sure that this will help, but I have had a similar issue and this has usually fixed it. Try these steps on the machine where it's not working.
Trusted sites
zone.Security
tab in Internet Options
and click Trusted sites
Default level
and make sure that it selects Medium
. If not, manually set it to Medium
.For good measure, close all IE windows and then relaunch and test if it works.
The key issue is the one that was discussed in the page that rene linked to in his second comment. As of IE8 and onwards, there is a security setting that does not have it's own UI in the Custom level
list of options. The only way to affect it is by setting the Level
- Medium
or lower sets it to Enable
while Medium-high
higher sets it to Disable
.
Now this might very well not be your problem, since usually the default level for Trusted sites
is Medium which would enable the setting. But it's worth trying at least (maybe you have some Group Policy or something that has changed the default level of Trusted Sites).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With