Applet hanging when connecting to different host than it's loaded from

Hi all !

First, i have signed the JAR so that isn\t my problem.

I have an applet that opens a connection to a server (not the one it\s loaded from) on port 80.

new Socket(........

When the the applet loads a get the cert question "Do you trust......."., so that's correct.

My problem is that this isn't working on all computer/network setups. I don't get an exception the thread just hangs when it's attempts to open the connection.

I'm pretty sure that this is a problem with how the network is set up since the same computer that didn't work when the VPN was turned on works when I turn off the VPN.

In the console the last thing I can see is when it's trying to connect to the host

(swedish):

network: Ansluter socket://host:80 med proxy DIRECT

(english(?)),

network: connecting socket://host:80 with proxy DIRECT

Does anyone have a clue on what's going on?

Pls save my life!!

[974 byte] By [ingo05a] at [2007-11-27 1:31:00]
# 1

1. Signed Applet

2. Trust / Certificate

3. Connection, TCP, port 80, connect

Okay, if it is hanging, it is likely waiting for something external to your code. So, your code is good, which is what you thought anyway.

Looks like a browser setting - it probably has less rights (sandboxed) on some machines whereas other machines give more access to the system.

So, if it still is not the browser settings, look at weather a local firewall is running that may be blocking the connection - by way of trapping. Most firewalls will cause a socket exception when you try to connect - if it is blocking-mode, and if it is trapping (i.e. faking a connection by keeping the machine's interface closed and simply bit-buckets any data that comes through).

Layers of Socket programming

1. Application

2. Browser

3. Firewall

4. Computer

5. Network

Looks like layer 2 or 3 is the cause, my guess is layer 2 - browser's java security settings due to it working "on some systems"

watertownjordana at 2007-7-12 0:33:03 > top of Java-index,Core,Core APIs...