Unity 3.0 crossdomain.xml issues

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Unity 3.0 crossdomain.xml issues

Postby lastowl » 27 Jan 2011, 15:27

On Webplayer the issues is after i use a login level and switch to my main scene, some things like Questit report of a crossdomain.xml is missing and i cannot load assetbundles it says assetbundles failed to open but this issues only happen in the webplayer on the second scene. The crossdomain.xml is loaded on the login scene but is it lost in the scene switch?

To my knowledge the crossdomain.xml affect most downloads including assetbundles, and other things use php to pass data so need the crossdomain.xml working. Any Ideas?

I posted this here rather than the unity forums because smartfox manages the crossdomain.xml
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 27 Jan 2011, 15:37

Its actually Unity that manages the webplayer security. There is nothing SFS specific in that.

But you obviously need to manipulate the content of the file to include your webserver that serves the asset bundles. And if thats a separate machine, that most likely needs to have its own mechanism to serve a policy file.

But its not SFS relevant I'm afraid
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 27 Jan 2011, 15:53

sorry i thought it was sfs... thanks for the ninja fast reply

Both the webplayer and the assetbundles are on the same server running IIS7, it gets the crossdomain.xml on the login scene but then starts asking for it in the second scene. I have even placed it in the root of the webserver along with the webplayer.
My only thought is that i get smartfox to auto create the file could that be the problem since it only gives it for port 4000(my chosen port) not 80 needed for assestbundle streaming? if so will i need a manual created crossdomain.xml for sfs to give?
COB
Posts: 68
Joined: 28 Dec 2010, 08:54

Postby COB » 27 Jan 2011, 18:43

It seems that I have the same confusing issue in my last post here:
viewtopic.php?t=9788
Everyone asks to check crossdomain.xml file, but it looks that this file is not used at all.
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 27 Jan 2011, 20:25

well anyone who want to recreate the issue with unity 3 just create a new scene and use the character customisation package and try to get a webplayer to run,

from what I've research even though smartfox provides a connection for socket connection, anything requiring port 80 needs a www connection instead, but that where my research has ended, it should automatically look at the webserver root for the crossdomain.xml which I've put there anyway and still no luck,

COB your problems does seem the same and others have reported the problem but no solution, the only thing i think to try would to not use smartfox at all for policy file and have a combined one called separately, the unity docs include a port range rather than just one but sfs only give the single port
COB
Posts: 68
Joined: 28 Dec 2010, 08:54

Postby COB » 28 Jan 2011, 06:55

It is possible to add under:
<AutoSendPolicyFile>true</AutoSendPolicyFile>
this line:
<ExternalPolicyFile>customcrossdomain.xml</ExternalPolicyFile>
This will force SFS not to use automaticaly generated policy file. However, this does not help for my problem.

Is it really not possible to have BlueBox on port 80 without any other ports open for policy file? When I have to use BlueBox it is obvious for me that I would not like to have any other socket connections on different (probably blocked) ports.
Unfortunately, Security.PrefetchSocketPolicy(SERVERIP, 80) results in:

Code: Select all

<policy-file-request/>.HTTP/1.1 400 Bad Request

Connection: close

Server: Jetty(6.1.16)

when I check it with Wireshark.
Does it have any sense to use ports like 843 only for policy file when BlueBox is going to be used? If I could have port 843 open, I would set standard socket connection to SFS without BlueBox.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 28 Jan 2011, 09:35

2 things seems to confuse me.

Policy file and crossdomain.xml is NOT the same from what I know. Policy file is served by SFS, but crossdomain.xml is something completely else.

Or?

The other thing is, that bluebox support is not released yet for SFS2X. So unsure where bluebox suddenly comes in?!?!?!

/Thomas
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 28 Jan 2011, 10:38

when sfs has the autosendpolicy = true doesn't it send a crossdomain.xml needed for a socket connection? i think the problems is port 80 needs to use the crossdomain.xml at webroot but mine doesn't seem to work, feel free to check at unity.lastowl.info/crossdomain.xml

but I do now realise that this isn't in the slightest sfs issue since for the socket connection the file is generated correctly


EDIT:Does port 843 return the crossdomain.xml for 80?
because telnet unity.lastowl.info 4000 returns the smartfox policy
telnet unity.lastowl.info 80 returns nothing
flash forums say having port 843 open serves http requests
COB
Posts: 68
Joined: 28 Dec 2010, 08:54

Postby COB » 28 Jan 2011, 15:27

ThomasLund wrote:2 things seems to confuse me.

Policy file and crossdomain.xml is NOT the same from what I know. Policy file is served by SFS, but crossdomain.xml is something completely else.

At the moment I know that SFS does not use crossdomain.xml file, but generates its own one. Of course I can make it to use this file, but this does not help.
ThomasLund wrote:Or?

The other thing is, that bluebox support is not released yet for SFS2X. So unsure where bluebox suddenly comes in?!?!?!

/Thomas

I use SFS, not SFS2X.

I have the same issue as lastowl. When I put this url in my browser:
SERVERIP/crossdomain.xml I can see policy file. However, when I try to use BlueBox I see this bad request reply in Wireshark.
COB
Posts: 68
Joined: 28 Dec 2010, 08:54

Postby COB » 30 Jan 2011, 14:19

After a lot of hours lost on this problem it is still not ok, but I have some new conclusions.
First of all BlueBox works well in standalone mode (Unity3d build option), because policy file is not needed. However, I noticed that BlueBox still sends it when connection is established and this is too late for the web player mode. Unity wants to receive this file earlier, before http connection is established. Probably socket policy server on different port will help, but why to use BlueBox if I could setup direct socket connection for the policy file? In my opinion this means that Unity3d may be simply not compatible with BlueBox due to this problem.
Last edited by COB on 01 Feb 2011, 14:09, edited 1 time in total.
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 31 Jan 2011, 13:54

i may have a solution first it depends on how your server is,
mine has a static ip attached via an awful old school firewall redirect and a completely external dns server which adds the domain name separately so if i used the domain name rather than the ip then it started getting confusing and policy files clashed along the way, use the direct ip instead

second i have to request ports to be unblocked on my own server and so i got port 843 unblocked as well even though it should be fine on just port 80

one of my issues regarding assetbundles turns out to have nothing to do with crossdomain issues, still haven't fixed it though but its a unity 3 issue not a sfs related issue
COB
Posts: 68
Joined: 28 Dec 2010, 08:54

Postby COB » 01 Feb 2011, 14:17

lastowl wrote:i may have a solution first it depends on how your server is,
mine has a static ip attached via an awful old school firewall redirect and a completely external dns server which adds the domain name separately so if i used the domain name rather than the ip then it started getting confusing and policy files clashed along the way, use the direct ip instead

At the moment this is not a problem for me. For tests I use server with public IP and even with this configuration BlueBox does not work as I would like. A the moment I do not think about future problems in corporate network...
lastowl wrote:second i have to request ports to be unblocked on my own server and so i got port 843 unblocked as well even though it should be fine on just port 80

Ok, but now you do not have to use BlueBox. Put SFS on port 843 and you will have direct socket connecton. In such configuration it is pointless to use BlueBox.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 1 guest