- Home /
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)
Load unity Webplayer.
unity call 'Security.PrefetchSocketPolicy( 1.1.1.100, 843)'
Policy-server send cross-domain info.
connect Server1 ... Success
And then... move server (server has different ip)
API call 'Security.PrefetchSocketPolicy( 1.1.1.200, 843)'
Policy-server send cross-domain info.
connect Server1 ... Success.
TEST 2* (Fail - different IP & using 9999 port)
Load unity Webplayer.
unity call 'Security.PrefetchSocketPolicy( 1.1.1.100, 9999)'
Policy-server send cross-domain info.
connect Server1 ... Success
And then... move server (server has different ip)
API call 'Security.PrefetchSocketPolicy( 1.1.1.200, 9999)'
Policy-server send cross-domain info.
connect Server1 ... Fail.
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?^^
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.
Your problem appears to be server-side, which you haven't described.
Thank you~ I added more info about server-side.
I can not solve this problem, yet... -0-
Your answer
Follow this Question
Related Questions
Web Player connection issue. 0 Answers
socket and crossdomain problem (Security.PrefetchSocketPolicy ) 1 Answer
Policy File is being served, but never recognized 1 Answer
Security.PrefetchSocketPolicy does not work in debug session? 0 Answers
How to prevent a Webplayer Game from being saved locally? 1 Answer