A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [AS2] XML Policy File Woes

  1. #1
    Pillow Daddy m_andrews808's Avatar
    Join Date
    May 2001
    Location
    London England
    Posts
    924

    [RESOLVED][AS2] XML Policy File Woes

    sooo.... I'm trying to connect to my xml socket server over port 1701. Testing locally works fine but when I test from my domain it connects very briefly only to disconnect.

    So after some reading around I found out about the security changes to FP 9.0.xx which require a seperate policy file for XML socket connectionss over port 843.

    I'm now running on my server a simple perl socket server on port 843, it listens only for the policy file request <policy-file-request/> and on receiving returns the following xml over the socket:

    PHP Code:
    <cross-domain-policy>
          <
    site-control permitted-cross-domain-policies='master-only'/>
          <
    allow-access-from domain='*' to-ports='*' />
    </
    cross-domain-policy
    when I test this I can see the my app connecting over port 843 and I see the server recive the policy file request. However when I subsequently connect to my main socket, it disconnects immediately exactly as it did without the policy file.

    As I say I can see the policy file being requested, though I can't see if it's successfully received by flash, I've no idea where to go from here?

    TIA
    Last edited by m_andrews808; 02-25-2010 at 08:38 AM. Reason: update as resolved


  2. #2
    Pillow Daddy m_andrews808's Avatar
    Join Date
    May 2001
    Location
    London England
    Posts
    924
    is ok! my policy server was broadcasting an initial <newUser id='0' /> welcome packet on connect so this was being received rather than the policy xml, is now fixed!


  3. #3
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    I thought you just needed to sit the policy file in the same directory as the .swf

    Is the server and .swf both located on the same server?
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

  4. #4
    Pillow Daddy m_andrews808's Avatar
    Join Date
    May 2001
    Location
    London England
    Posts
    924
    I think that's the old security model, socket connections now require their own cross-domain policy file which the flash player (9 and up) automatiacally looks for:

    http://www.adobe.com/devnet/flashpla...icy_files.html


  5. #5
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    Ahh cool, thanks for the heads up
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center