Login Problems

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

Moderators: Lapo, Bax

dan111
Posts: 8
Joined: 27 May 2005, 21:50
Location: England
Contact:

Login Problems

Postby dan111 » 28 May 2005, 15:47

I know this is probably a stupid problem with an easy solution but I've tried everything and I cant get it to work. When I opened the Avatar Chat example on my computer it worked perfectly but when I published it to the internet it says that it has connected but when I try to use the 'Login' button nothing happens. I think it's something to do with the included files but I wasn't sure so I posted here. Any ideas?
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 29 May 2005, 07:26

Hi,
it has to do with the flash player restrictions, not the included files.
To make a long story a short one, the flash player does not allow to connect to servers other than the one where the SWF file is published.

To learn how to avoid these problems read the SmartFoxServer documentation available here >> http://www.smartfoxserver.com/docs/

The chapter you need to read is 3.1

Hope it helps! :)
Lapo
--
gotoAndPlay()
...addicted to flash games
dan111
Posts: 8
Joined: 27 May 2005, 21:50
Location: England
Contact:

Postby dan111 » 29 May 2005, 09:54

Thanks. I had already tried the System.security.loadPolicyFile but it didnt work so I'm going to try the other way.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 29 May 2005, 10:08

That feature works if your flash player is at least version 7.0.19 or better...
Lapo

--

gotoAndPlay()

...addicted to flash games
dan111
Posts: 8
Joined: 27 May 2005, 21:50
Location: England
Contact:

Postby dan111 » 29 May 2005, 10:38

I've made a 'crossdomain.xml' file and added this code to the top of the actionscript on the 'Connect' frame of the AvatarChat:

Code: Select all

System.security["loadPolicyFile"]("xmlsocket://192.168.0.178:9339")
but it still won't log me in. I think I have the latest version of flash too.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 May 2005, 09:52

Hi,
check in the config file (config.xml) if you have this line:

Code: Select all

<AutoSendPolicyFile>true</AutoSendPolicyFile>


If not just add it in the <ServerSetup></ServerSetup> block.

Restart the server.
Now open a new console window and typt this line:

Code: Select all

telnet www.xxx.yyy.zzz 9339


where www.xxx.yyy.zzz is the server IP address.
You should receive a response similar to this:

Code: Select all

<cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>


Let me know if it works!
Lapo

--

gotoAndPlay()

...addicted to flash games
dan111
Posts: 8
Joined: 27 May 2005, 21:50
Location: England
Contact:

Postby dan111 » 31 May 2005, 19:01

Thanks it's working now. I didnt have the

Code: Select all

<AutoSendPolicyFile>true</AutoSendPolicyFile>
in my config file and I had the wrong path to my lib files. Thanks again.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 31 May 2005, 19:14

I am glad it works now! :)
Lapo

--

gotoAndPlay()

...addicted to flash games
BadDude
Posts: 4
Joined: 04 Jul 2005, 12:41

AutoSendPolicyFile

Postby BadDude » 04 Jul 2005, 12:48

Is this feature supported in all version?

I downloaded the lite, and while it is working in localhost, if I try to connect to the server from under an other domain (i put the swf up to our local test server, which means the simpleChat.swf is under a different domain), it doesn't work. If I try the swf (and only the swf) from an other computer (which means the swf wont be under an other domain, just standalone), it is working.

The <AutoSendPolicyFile> set to true in the config, and if I try to telnet to the server, it is simply doesn't response. The telnet said i'm connected, but no policy response. If I dont load the System.security.loadPolicyFile("xmlsocket://" + ip + ":" + port), I can see the sandbox violation message in the debug player, if I put in it, the swf just wait for the connection, no error message.

I wrote a simple socketserver in c#, and I can telnet to it from remote (on the same port, same machine, like the samrtfox server), so theres no firewall block, nothing.

Do you have any idea whats wrong?

Thanks.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Jul 2005, 13:09

Hi,
the Lite version does not support the auto-policy thing but you can put the crossdomain.xml file in the root fo your webserver and the problem is solved.

About telnetting the server that's ok, the server does not send any information upon connection so if you telnet the server and you get connected the server is definetely working
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 44 guests