Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by chogo · Jan 19, 2012 at 07:19 AM · webplayerserverconnectionsandboxpolicy

cannot connect web player to server, what did I done wrong?

My team try to make a web based version by using Unnity 3.4x but we failed to connect to our game server as in the picture. What is the solution to connect from a web player to server? we doone pretty fine for client based but not the web player.

in the developement phase (Unity3D editor), we do fine for connecting out of sandbox to policy server (using Socket port:843, then connect to game server later) but in deployment stage, the connection to policy server cannot be reached.

Please help!!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Yoerick · Jan 23, 2012 at 09:16 AM

When you build a unity webplayer project, it will (for security reasons, found here) look for an xml file called "crossdomain.xml". Just make sure there is an xml file present at the location of the webplayer build (on your server) and it allows the right ports and domains.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image chogo · Jan 23, 2012 at 09:39 AM 0
Share

Thx, Yoerick. I do follow your link then I found that it is about WWW class, but I'm using Socket to connect to policy server (port 843). Sorry if my question confusing you.

again, we can connect through port 843 to policy server in the editor, but when we do from webplayer, the policy server is cannot be connected and it throw the Exception as in picture.

avatar image Yoerick · Jan 24, 2012 at 09:52 AM 0
Share

In the screenshot I see you're using xampp, you have to make sure there is a crossdomain.xml file present in the "htdocs" directory. In the xampp control panel press "explore" and then navigate to the htdocs folder and place the xml file there. Also, are you using any server provider like Smartfox, Photon, ...?

avatar image chogo · Jan 25, 2012 at 04:34 AM 0
Share

I already try that as well, still not work out.

I'm now using my own propritary game server (I do try with Smartfox it won't work as well) I do pretty good job in the editor, it can connect to the policy server and game server easily but not from the webplayer on deployment site.

avatar image Fragmental · Jul 01, 2014 at 11:20 AM 0
Share

You have to read further down to the part that says "Implications for use of Sockets:" It's not an easy read but this may help

For your convenience, we provide a small program which simply listens at port 843; when on a connection it receives a request string, it will reply with a valid socket policy. The server code can be found inside the Unity install folder, in Data/Tools/SocketPolicyServer on Windows or /Unity.app/Contents/Tools/SocketPolicyServer on OS X. Note that the pre-built executable can be run on $$anonymous$$ac since it is a $$anonymous$$ono executable. Just type “mono sockpol.exe” to run it.

avatar image
0

Answer by josszp · Jun 22, 2012 at 10:23 AM

I met the same problem, I use the photon server. Most important thing is I have no idea at all now. So I need help also. This is my post: http://forum.unity3d.com/threads/140677-How-to-use-the-Security.PrefetchSocketPolicy-!!!!

TO asked : Have you work around, if you do, tell me how, pls!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by josszp · Jun 22, 2012 at 10:08 AM

I met the same problem and also I have no idea. This is my post: http://forum.unity3d.com/threads/140677-How-to-use-the-Security.PrefetchSocketPolicy-!!!!

TO Ask: Have you worked around it, if you have, tell me how pls. Thank you a lot!!!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

FTP Upload Files 2 Answers

Web Player build doesn't connect to my server, PC build works fine 0 Answers

Internet Connection Check using 204 HTTPStatusCode 1 Answer

Web-project "Session End" 0 Answers

How do i connect to a remote Asset server Host? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges