Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to call external servlet from Flex app
    primarykey
    data
    text
    <p>I am callng a servlet from a browser based Flex app but get the following exception:</p> <pre><code>Error #2044: Unhandled securityError:. text=Error #2170: Security sandbox violation: http://MyURL/web-player/WebPlayer.swf cannot send HTTP headers to http:/MyOtherUrl:1936/ImageUpload. at WebPlayer/screenGrab() at WebPlayer/__exportImageButton_click() </code></pre> <p>I have the following crossdomain.xml being served from </p> <pre><code>http://MyOtherUrl/ </code></pre> <p>and </p> <pre><code>http://MyOtherUrl:1936/ </code></pre> <p>(the port the servlet is served from).</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt; &lt;cross-domain-policy&gt; &lt;allow-access-from domain="*" /&gt; &lt;allow-http-request-headers-from domain='*' headers="*" secure="false"/&gt; &lt;site-control permitted-cross-domain-policies="all"/&gt; &lt;/cross-domain-policy&gt; </code></pre> <p>What am I doing wrong?</p> <hr> <p>Edit to include code</p> <hr> <pre><code>var urlRequest:URLRequest = new URLRequest(); urlRequest.url = "http://MyUrl:1936/ImageUpload"; urlRequest.contentType = 'multipart/form-data; boundary=' + UploadPostHelper.getBoundary(); urlRequest.method = URLRequestMethod.POST; var params:Object = new Object(); params.userId = userId; params.videoId = videoId; urlRequest.data = UploadPostHelper.getPostData("splash.jpg", jpegStream, params); urlRequest.requestHeaders.push( new URLRequestHeader( 'multipart/form-data', 'image/jpg' ) ); var urlLoader:URLLoader = new URLLoader(); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError); urlLoader.dataFormat = URLLoaderDataFormat.BINARY; urlLoader.load(urlRequest); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload