Page 1 of 1

BlueBox and Unity Webplayer Sec policy: any news?

Posted: 26 Aug 2012, 15:05
by metafa
I don't know where to put this. Is it only a client or also a server issue? I don't really know.

So I read the following threads:

http://forums.smartfoxserver.com/viewtopic.php?t=8878
http://forums.smartfoxserver.com/viewtopic.php?t=10891
http://forums.smartfoxserver.com/viewtopic.php?t=10890
http://forums.smartfoxserver.com/viewtopic.php?t=8878

I tried to get it working with a modified version of the FPS Demo and it works good with standalone. In the code I switch to bluebox and set the http port, also using the Security.PrefetchSocketPolicy function, with interval and without, having deployed the webplayer locally and on the same server and port as the BlueBox, .. no luck, crossdomain.xml doesn't change a thing. Did anyone get this working, yet? What is the real problem of the webplayer?

Thanks in advance.

EDIT: This is the crossdomain.xml I have in www/root and SFS2X/config:

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy 
  SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-access-from domain="*" />
</cross-domain-policy>

Re: BlueBox and Unity Webplayer Sec policy: any news?

Posted: 26 Aug 2012, 15:53
by Lapo
You have linked a few threads that are pretty old, from 2010 and 2011.
Can you please describe exactly what the problem is? As far as the server goes you can edit the crossdomain.xml as you please so there should be no problem at all.

Thanks
p.s. = I've moved the post to the Unity section

Re: BlueBox and Unity Webplayer Sec policy: any news?

Posted: 26 Aug 2012, 16:37
by metafa
Thanks for your reaction. The problem is all tries to connect from the webplayer to the bluebox fail because of the security policy of the webplayer. crossdomain.xml doesn't change that. I guess my question is: What is the trick here? Has someone got it working already and how?

Re: BlueBox and Unity Webplayer Sec policy: any news?

Posted: 27 Aug 2012, 08:56
by metafa
Today I got it working, using these threads: http://forums.smartfoxserver.com/viewtopic.php?t=9788 and http://forums.smartfoxserver.com/viewto ... 20&t=14523

All I had to do was put this in the start-function (smartfox runs on port 9332, bluebox on 8080):

Code: Select all

	void Start()
	{
		if (Security.PrefetchSocketPolicy(serverName, Convert.ToInt32(9332), 500))
			Debug.Log("good!");
		else
			Debug.Log("bad!");
		if (Security.PrefetchSocketPolicy(serverName, Convert.ToInt32(8080), 500))
			Debug.Log("bluebox policy good!");
		else
			Debug.Log("bluebox policy bad!");
	
		bool debug = false;
		if (SmartFoxConnection.IsInitialized)
		{
			smartFox = SmartFoxConnection.Connection;
			smartFox.UseBlueBox = true;
			smartFox.HttpPort = 8080;
		}
		else
		{
			smartFox = new SmartFox(debug);
		}
		smartFox.AddLogListener(LogLevel.INFO, OnDebugMessage);	
	}

Re: BlueBox and Unity Webplayer Sec policy: any news?

Posted: 27 Aug 2012, 10:20
by Lapo
Excellent :)