Java Applet from IE - SecurityException connection error

Harmen van der Wal harmen.wal "at" tip.nl
Fri, 08 Jun 2001 15:53:51 +0000


Tony Lin wrote:
> 
> Hello all,
> 
> I am using the update versions from "uk.research.at.com". When I use Java
> Applet from IE or Netscape to connect to a PC(windows 2000), it has an error
> message " com.ms sedurity.SecurityExcepionEx[rfbProto.<init>]: cannot access
> "192.9.200.69". 5900". Can someone tell me how to solve this problem? But it
> works fine from VNCWindow or Dos windows by running command:

I suppose the applet is not hosted on 192.9.200.69? A (sandboxed)
applet can only connect back to its origin host.

> 
> C:\1 x\New Folder\tightvnc-1.1p9_javabin\classes>java vncviewer HOST
> 192.9.200.69 PORT 5900

Java applications have an easier security policy than applets.

> 
> Here is the HTML page that I used to connect the PC with the connection
> ERROR.
> 
> <html>
>   <head>
>       <title>VNCviewer</title>
>   </head>
>   <body>
>       <h1>VNCviewer for eValid</h1>
>       <hr>
>       <applet codebase="." applet code="vncviewer.class"
> ARCHIVE=vncviewer.jar WIDTH=800 HEIGHT=600>
>   <param name="HOST" value="192.9.200.69">
>   <param name="PORT" value="5900">
>   <param name="Encoding" value="evalid">
>   <param name="Use CopyRect" value="Yes">
>   <param name="Mouse buttons 2 and 3" value="Normal">
>   <param name="Raw pixel drawing" value="Reliable">
>   <param name="CopyRect" value="Fast">
>   <param name="Share desktop" value="Yes">
> </APPLET>
> 
>   </body>
> </html>

It seems you crafted your own html. That's OK, but if HOST is not
the applets origin host (like in the applets codebase), you will
get the security exception. BTW it is not important where the
html document is located.

You could look into setting an easier security policy for this
particular applet (maybe signing it). You could also use a simple
TCP/IP redirector on the host where the applet is hosted. Or
maybe you could just host the applet on the vncserver host, using
VNC's own httpd, putting the HTML document wherever you like.

-- 
Harmen
http://www.xs4all.nl/~harmwal/
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------