x


Security.PrefetchSocketPolicy problem.


In testing, I got a error about corssdomain.



ErrorCode

** SecurityException: Unable to connect, as no valid crossdomain policy was found **



My crossdomain policy ...

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




I made 'socket server' as follows... (client unity is webplayer version)

1) Policy-server : If unity API(Security.PrefetchSocketPolicy ) call policy, will send crossdomain policy.
2) server1 : check users login
3) server2 : play game




  • TEST 1 (Success - different IP & using default 843 port) -
  1. Load unity Webplayer.
  2. unity call 'Security.PrefetchSocketPolicy( 1.1.1.100, 843)'
  3. Policy-server send cross-domain info.
  4. connect Server1 ... Success
  5. And then... move server (server has different ip)
  6. API call 'Security.PrefetchSocketPolicy( 1.1.1.200, 843)'
  7. Policy-server send cross-domain info.
  8. connect Server1 ... Success.



  • TEST 2 (Fail - different IP & using 9999 port) -
  1. Load unity Webplayer.
  2. unity call 'Security.PrefetchSocketPolicy( 1.1.1.100, 9999)'
  3. Policy-server send cross-domain info.
  4. connect Server1 ... Success
  5. And then... move server (server has different ip)
  6. API call 'Security.PrefetchSocketPolicy( 1.1.1.200, 9999)'
  7. Policy-server send cross-domain info.
  8. connect Server1 ... Fail.
  9. Return Error : ** SecurityException: Unable to connect, as no valid crossdomain policy was found **




"TEST-1" is Success. (no problem)
- Server1's IP is 1.1.1.100
- Server2's IP is 1.1.1.200
- Call 843 port for cross-domain info.



"TEST-2" is Fail !!!!!
- Server1's IP is 1.1.1.100
- Server2's IP is 1.1.1.200
- Call 9999 port for cross-domain info.



what is wrong?

Please help me~~~ :)

Thank you for read my question ^^




More info~~ :)

Policy-Server (send crossdomain info to unity) is open 9999 port.

A machine (IP 1,1,1,100)
- Policy-server open 9999 port
- Server1 open 11111 port

B machine (IP 1,1,1,200)
- Policy-server open 9999 port
- Server2 open 11111 port


Process step...
1. Unity webplayer connect Policy-Server's 9999 port for receive crossdomain info. (A Machine)
2. connect Server1
3. move Server1 -> Server2
4. connect Policy-Server's 9999 port for receive crossdomain info. (B Machine)
5. connect Server2
6. But, unity can not connect Server2 .....

If Policy-Server's port is 843(default), that process(move machine) is success.
But, If Policy-Server's port is changed(9999), that process(move machine) is fail.




If do not move (A machine -> B machine), it is success.

Unity only access A machine, or only access B machine is Success. But, unity access A machine and then access B machine is Fail.


What is problem?^^

more ▼

asked Aug 26 '11 at 10:39 AM

boolpae gravatar image

boolpae
1 3 5 6

Pleas don't add "please help" stuff to your title. The more clean and clear and uncluttered your question is, the more broadly useful it is and the more likely you will get a satisfactory answer. Click Edit under your question to fix.

Aug 26 '11 at 12:35 PM Waz

Your problem appears to be server-side, which you haven't described.

Aug 26 '11 at 12:37 PM Waz

Thank you~ I added more info about server-side.

I can not solve this problem, yet... -0-

Aug 27 '11 at 04:44 AM boolpae
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x815
x60
x36
x27
x4

asked: Aug 26 '11 at 10:39 AM

Seen: 1975 times

Last Updated: Aug 29 '11 at 05:49 AM