| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | Re: Remote applet access problem Ingo Pakleppa Fri, 14 Apr 2000 15:59:15 -0700 |
The message actually tells you exactly what's wrong: a security exception. That means, logically, it is perfectly correct what you are doing - but Netscape does not let you do this for security reasons. Remember that Java applets run in a "sandbox" and are deliberately prohibited from certain actions. For instance, connecting to anything but the server that it came from. Or in this case, it seems that you are not permitted to use the IP address, only the symbolic name (such as www.xxx.com) - I'm not sure if that really is it. Another possibility is that the browser lets you only connect to an IP address if there is a corresponding name in the DNS system. I'm just guessing here about the exact problem, but this should give you a starting point. Ingo At 11:39 AM 4/14/00 -0400, Mark Gilmore wrote: >Hi all, >I am having a problem trying to connect to ECS remotely: > >When I enter this www address (for a LOCAL connection), all works fine: > http://localhost:3000/LCL.HTM >In LCL.HTM, we have: > <APPLET NAME="Ecsio" CODE="Ecsio.class"> > <param name="ECS_HOST" value="localhost"> > <param name="ECS_PORT" value="3000"> > </applet> > >BUT when I enter THIS, I get the errors below: > http://216.80.145.31:3000/RMT.HTM >In RMT.HTM, we have: > <APPLET NAME="Ecsio" CODE="Ecsio.class"> > <param name="ECS_HOST" value="http://216.80.145.31"> > <param name="ECS_PORT" value="3000"> > </applet> >http://216.80.145.31 is the IP address of my www connection. >If I enter "http://216.80.145.31:3000", ECS returns it's "home" >page (as expected). > >I get the feeling that I am missing something obvious. >I note that the addr in message below does NOT include the port # >(3000). >Any ideas ? Thanks. > >Ecsio:init:ecs_host=http://216.80.145.31:3000 >Ecsio:connect:get socket >netscape.security.AppletSecurityException: security.Couldn't resolve IP >for host http://216.80.145.31 or for 216.80.145.31. > at java.lang.Throwable.<init>(Compiled Code) > at java.lang.Exception.<init>(Compiled Code) > at java.lang.RuntimeException.<init>(Compiled Code) > at java.lang.SecurityException.<init>(Compiled Code) > at netscape.security.AppletSecurityException.<init>(Compiled Code) > at netscape.security.AppletSecurityException.<init>(Compiled Code) > at netscape.security.AppletSecurity.checkConnect(Compiled Code) > at netscape.security.AppletSecurity.checkConnect(Compiled Code) > at netscape.security.AppletSecurity.checkConnect(Compiled Code) > at java.lang.SecurityManager.checkConnect(Compiled Code) > at java.net.InetAddress.getAllByName0(Compiled Code) > at java.net.InetAddress.getByName(Compiled Code) > at java.net.Socket.<init>(Compiled Code) > at Ecsio.connect(Compiled Code) > at Ecsio.start(Compiled Code) >* at >netscape.applet.DerivedAppletFrame$StartAppletEvent.dispatch(Compiled >Code) > at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled >Code) > at java.awt.EventDispatchThread.run(Compiled Code) > at >netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled >Code) >-- >Mark Gilmore >Omnipotence (ECS home automation software) >http://www.usit.com/omnip >423-745-0026 >Hours: Mon-Sat, 9AM-8PM/EST