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
0
Question by BDV · Mar 26, 2015 at 11:39 PM · webplayerconnectionftpcrossdomain.xmlsecuritysandbox

FTP connection WebPlayer SecurityException: Unable to connect, as no valid crossdomain policy was found

Hi, i am creating WebPlayer game where you can save and load based on your login/password. I need to connect to my Ftp server that is secured with login and password. crossdomain.xml is included in the root folder of my server.

   webClient.Credentials = new NetworkCredential("username", "password");
      
         string js = webClient.DownloadString("ftp://ftp.domain.com/saveData/saveData.json");
        savingData = js;
 

I always got an SecurityException: Unable to connect, as no valid crossdomain policy was found. if i change the url to an classic webserver without any security with the same crossdomain.xml file it works fine. I was also trying FtpWebRequest methods with the same result.

Any ideas what can be wrong ? Thank you

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Mar 27, 2015 at 02:03 AM

An FTP connection is not a HTTP connection. Therefore i would say your FTP server needs to run a socket policy server on port 843 or on a different port and you have to call Security.PrefetchSocketPolicy manually. The crossdomain.xml file in the root folder of a webserver only grants access to that webserver. Any other ports / protocols aren't affected by this file. Read the linked page carefully.

Comment
Add comment · Show 2 · 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 BDV · Mar 31, 2015 at 01:37 PM 0
Share

How can i create a socket policy server ?

avatar image Bunny83 · Apr 01, 2015 at 06:49 PM 0
Share

@BDV:

Unity ships a simple console program (sockpol.exe) which can be run along with your server. It's located at your Unity install path:

 Unity/Editor/Data/Tools/SocketPolicyServer/

You can simply run that program with the parameter "--all" and it should enable the webplayer to fetch a policy which allows access to all ports on that server.

 sockpol.exe --all

Unity also ships the "sockpol.cs" file which contains the source code of that little program in case you want to implement your own.

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

21 People are following this question.

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

Related Questions

Webplayer throwing FTP errors as popups 1 Answer

Web Player and database 1 Answer

Ive spent 3 hours on this x.X 7 Answers

Crossdomain.xml policy file not found 0 Answers

crossdomain.xml error when hosted on https but requesting http 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