Skip navigation
Currently Being Moderated

Getting Security Error# 2048 while working in Flash 11.2

May 17, 2012 4:52 AM

Hi all,

 

Greetings to all. Well So i prepared a widget written in Action Script 3. Here are my system configurations:

OS: Windows 7

Flash: 11.2

Now when i make a SWF file and open it in my local host i can see the widget running with no problems.

But when i wrapp the SWF file/ Flash Widget in HTML and then try to run it in my local host it is giving me security error 2048. Below is the error i am getting:

 

Error 2048
Error Security: 0:[SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"] - {"config":{"fragmentOutgoingMessages":true,"maxReceivedFrameSize":104 8576,"fragmentationThreshold":16384,"maxMessageSize":8388608,"closeTim eout":5000,"assembleFragments":true},"debug":true,"extensions":[],"rea dyState":0,"bufferedAmount":0,"resource":"/1.0.0/events/annotation.OQB 15MCCCLO49620VHC4R8C8D/","port":25899,"useNullMask":false,"host":"127. 0.0.1","protocol":null,"secure":false,"uri":"ws://127.0.0.1:25999/1.0. 0/events/annotation.OQB15MCCCLO49620VHC4R8C8D/","connected":false}

 

After some googling and visiting some forums/websites on the internet i also included the following cross domain parameters in the root location of my source code:

<?xml version=\"1.0\"?> <!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\"> <cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="localhost" to-ports="*" secure="false" />
<allow-access-from domain="*" secure="false" to-ports="{0,number,#}"/>" <allow-http-request-headers-from domain="*" headers="*"/>" </cross-domain-policy>

 

 

Apart from the above settings i also made a mms.cfg file to include the DisableSocket=0 but still not working.

 

I am using websocket connections in my widget and using open source lib AS3Websocket library.

 

Can you guys anyone here can shed some light on this.It will be a huge help.

 

 

Thank you and have nice time people.

 
Replies
  • kglad
    62,194 posts
    Jul 21, 2002
    Currently Being Moderated
    May 17, 2012 5:37 AM   in reply to mayanks20

    what does your widget do?

     
    |
    Mark as:
  • kglad
    62,194 posts
    Jul 21, 2002
    Currently Being Moderated
    May 17, 2012 6:09 AM   in reply to mayanks20

    is it loading data?  from where is it loading data and what kind of data?

     
    |
    Mark as:
  • kglad
    62,194 posts
    Jul 21, 2002
    Currently Being Moderated
    May 17, 2012 7:12 AM   in reply to mayanks20

    that should be:

     

    DisableSockets=0

     

    and are you loading your policy file?  if yes, show your code.

     
    |
    Mark as:
  • kglad
    62,194 posts
    Jul 21, 2002
    Currently Being Moderated
    May 17, 2012 9:39 AM   in reply to mayanks20

    are you loading your policy file?

     

    something like:

     

    Security.loadPolicyFile("xmlsocket://localhost:yourport");

     
    |
    Mark as:
  • kglad
    62,194 posts
    Jul 21, 2002
    Currently Being Moderated
    May 17, 2012 9:39 PM   in reply to mayanks20

    yes, you need to load the policy file.  i just don't know what path/name/socket you should use.

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 1:59 AM   in reply to mayanks20

    Hi mayanks20,

     

    policy content from policy socket server must be:

    "<cross-domain-policy><site-control permitted-cross-domain-policies=\"master-only\"/><allow-access-from domain=\"*\" to-ports=\"*\"/></cross-domain-policy>\0"

    no xml header, end with zero.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points