Problem with hosting

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Problem with hosting

Postby Heatkigerr » 24 Oct 2014, 18:41

http://stackoverflow.com/questions/26415476/actionscript-smartfoxserver-unable-to-connect/26459408#26459408

This is our problem ,but noone at Stackoverflow seems to know the answer.

Help would be much appreciated.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 25 Oct 2014, 08:41

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
Lapo
--
gotoAndPlay()
...addicted to flash games
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 26 Oct 2014, 18:52

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.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 27 Oct 2014, 10:20

Are you running your application in the browser or in the standalone Flash Player?
Lapo

--

gotoAndPlay()

...addicted to flash games
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 27 Oct 2014, 13:11

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.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 27 Oct 2014, 18:56

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 :mrgreen:
Lapo

--

gotoAndPlay()

...addicted to flash games
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 29 Oct 2014, 03:17

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 :mrgreen:


Thanks! That solved it. I really would have wished that this information was in the "behind a router" sticky thread.
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 16 Feb 2015, 21:59

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?
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 17 Feb 2015, 10:51

Can you please report which error exactly?
Lapo

--

gotoAndPlay()

...addicted to flash games
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 17 Feb 2015, 16:25

[WARN] Security Error: Error #2048: Security sandbox violation: #file#: cannot load data from #IP#.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 17 Feb 2015, 17:54

What is the port number contained in the error?
Lapo

--

gotoAndPlay()

...addicted to flash games
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 17 Feb 2015, 23:35

9339.

Telnetting has been done successfully to that port.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 18 Feb 2015, 09:21

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
Lapo

--

gotoAndPlay()

...addicted to flash games
Heatkigerr
Posts: 18
Joined: 22 Oct 2014, 22:43

Re: Problem with hosting

Postby Heatkigerr » 19 Feb 2015, 11:57

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/26415476/actionscript-smartfoxserver-unable-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?
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with hosting

Postby Lapo » 19 Feb 2015, 12:10

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.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 37 guests