IE8 security and SDK.

Started by clarknayl, March 27, 2011, 07:58:53 PM

Previous topic - Next topic

clarknayl

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="styles/mainStyle.css" type="text/css">
   <title>Lamp Lighter</title>   
</head>
<BODY onload="loader()">
<CENTER><H2>PTC Lamp Lighter Commands</H2></CENTER>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript">
var x10;
function loader(){x10 = new ActiveXObject( "X10.ActiveHome" );}
function DoCommand( Command ) {
      if (Command == 09) {x10.SendAction( "sendplc", "a5 on"  );}
      if (Command == 10) {x10.SendAction( "sendplc", "a5 off" );}

</SCRIPT>
<CENTER><FORM NAME="myButtons">
  <BR>
   <INPUT NAME="btnSendCommand09" TYPE="Button" VALUE="A5 ON"  onclick="DoCommand( 09 );">
   <INPUT NAME="btnSendCommand10" TYPE="Button" VALUE="A5 OFF" onclick="DoCommand( 10 );"><br>
</FORM></CENTER>
</BODY>
</HTML>

Works from a server when "Enable Protected Mode" is left unckecked, but not when checked. Works both ways in localhost. Any ideas?

Many Thanks,
ClarkNaylor

ErikP

All SDK commands get routed through the X10nets service.  Unfortunately, this service must run elevated (run as administrator) to work properly.  Applications working in protected mode do not have permission to access or bind to a process running elevated.

Localhost works because windows treats local content specially and automatically does not run in protected mode.

See the "Understanding and Working in Protected Mode Internet Explorer" article on MSDN for more information.
http://msdn.microsoft.com/en-us/library/bb250462(v=vs.85).aspx

If you are working on a system with the ActivePhone plugin installed you could alternatively use some Anthony Lavado's excellent tips and tricks to build some URL calls into your webpage to send the PLC commands that way.  This will work in protected mode.
http://forums.x10.com/index.php?topic=21436.0