Page 1 of 2
Problem with hosting
Posted: 24 Oct 2014, 18:41
by Heatkigerr
http://stackoverflow.com/questions/2641 ... 8#26459408
This is our problem ,but noone at Stackoverflow seems to know the answer.
Help would be much appreciated.
Re: Problem with hosting
Posted: 25 Oct 2014, 08:41
by Lapo
In order to rule out firewall issues try telnetting the server and see if you can connect.
Open a command prompt and type:
Code: Select all
telnet <server-address> <server-port>
server-address should be the public address of your server. Let me know if it works.
Cheers
Re: Problem with hosting
Posted: 26 Oct 2014, 18:52
by Heatkigerr
Lapo wrote:In order to rule out firewall issues try telnetting the server and see if you can connect.
Open a command prompt and type:
Code: Select all
telnet <server-address> <server-port>
server-address should be the public address of your server. Let me know if it works.
Cheers
Telnet is successfull.
Re: Problem with hosting
Posted: 27 Oct 2014, 10:20
by Lapo
Are you running your application in the browser or in the standalone Flash Player?
Re: Problem with hosting
Posted: 27 Oct 2014, 13:11
by Heatkigerr
Lapo wrote:Are you running your application in the browser or in the standalone Flash Player?
I'm running the SWF that my Flash CS6 exports when running the FLA.file.
So, no browser involved.
Re: Problem with hosting
Posted: 27 Oct 2014, 18:56
by Lapo
Running the SWF directly will launch the standalone FlashPlayer, which in turn has a security mechanism that will prevent the network to be used.
Also it will do this without notice for the user!
This is known problem that Adobe has never fixed. They rely on the developer to understand from the error they get that they need to configure the "trusted locations" in their Flash Player to be able to access the network.
Depending on which OS you use you will have to right click in the Flash Player, click on Global Settings and from there you should find something like "Developer Settings" where you can specify the trusted files. In other words you will have to manually tell the player that you trust the SWF file and thus allow network access.
If you don't wanna go through all that, just open the SWF in the browser

Re: Problem with hosting
Posted: 29 Oct 2014, 03:17
by Heatkigerr
Lapo wrote:Running the SWF directly will launch the standalone FlashPlayer, which in turn has a security mechanism that will prevent the network to be used.
Also it will do this without notice for the user!
This is known problem that Adobe has never fixed. They rely on the developer to understand from the error they get that they need to configure the "trusted locations" in their Flash Player to be able to access the network.
Depending on which OS you use you will have to right click in the Flash Player, click on Global Settings and from there you should find something like "Developer Settings" where you can specify the trusted files. In other words you will have to manually tell the player that you trust the SWF file and thus allow network access.
If you don't wanna go through all that, just open the SWF in the browser

Thanks! That solved it. I really would have wished that this information was in the "behind a router" sticky thread.
Re: Problem with hosting
Posted: 16 Feb 2015, 21:59
by Heatkigerr
Sorry for bringing up an old topic, but now it works by editing the global settings as described above.
However, it does not work by default in any browser apart from Internet Explorer. I still get this sandbox security error.
Is there any way to avoid this?
Re: Problem with hosting
Posted: 17 Feb 2015, 10:51
by Lapo
Can you please report which error exactly?
Re: Problem with hosting
Posted: 17 Feb 2015, 16:25
by Heatkigerr
[WARN] Security Error: Error #2048: Security sandbox violation: #file#: cannot load data from #IP#.
Re: Problem with hosting
Posted: 17 Feb 2015, 17:54
by Lapo
What is the port number contained in the error?
Re: Problem with hosting
Posted: 17 Feb 2015, 23:35
by Heatkigerr
9339.
Telnetting has been done successfully to that port.
Re: Problem with hosting
Posted: 18 Feb 2015, 09:21
by Lapo
I am sorry I am not follow what the problem is.
If you want, send me your server address in a private message and I will test from remote. This way I can see if the problem is reproducible or if it's something else.
thanks
Re: Problem with hosting
Posted: 19 Feb 2015, 11:57
by Heatkigerr
it's a bit difficult to find the inbox at this forum, so I'll just paste what you wrote:
Hi,
I don't see anything wrong. The client connects and there is no error.
I've tried the SimpleConnect example in the Examples/AS2 folder and the AvatarChar in AS3/
I have no idea what might be going on on your side.
http://stackoverflow.com/questions/2641 ... to-connect
If you scroll down on the link over (already been posted earlier in this tread), you will find the Actionscript file we are using to test the connection.
Do you see any problem with it that may cause this to happen?
Re: Problem with hosting
Posted: 19 Feb 2015, 12:10
by Lapo
Yes I do.
You create the class, add the event listeners and then send a login request... without connecting first?
Code: Select all
var smartFox:SmartFoxClient = new SmartFoxClient(true)
smartFox.addEventListener(SecurityErrorEvent.SECURITY_ERROR, sandboxHandler)
smartFox.addEventListener(SFSEvent.onConnection, onConnectionHandler)
smartFox.connect(ip_text.text, int(port_text.text))
smartFox.addEventListener(SFSEvent.onLogin, onLoginHandler)
smartFox.addEventListener(SFSEvent.onRoomListUpdate, onRoomListUpdateHandler)
smartFox.login(zone_text.text, name_text.text, "")
First you need to call
connect(...), handle the connection event,
then send the login request.
Please refer to the examples provided in your SFS installation (under the Examples/ folder) if you have any doubts about this.
hope it helps.