J'ai passé pas mal de temps là-dessus alors voici où je suis coincé.Flex crossdomain.xml ne fonctionne pas correctement dans Chrome/Firefox?
J'utilise le lecteur de débogage 10.1 pour obtenir une demande de XMLA de:
http://localhost/dir/blah.swf
à:
http://localhost/olapbin/msblah.dll
Cela a bien fonctionné dans le système de fichiers, mais maintenant son sur un serveur web IIS7 .
Après beaucoup de jongler avec le fichier crossdomain.xml je me suis installé sur:
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
qui est placé dans:
http://localhost/crossdomain.xml
et lu avec:
Security.loadPolicyFile("http://localhost:80/crossdomain.xml");
I configuration du fichier de politique (qui a aidé à trouver le fichier ci-dessus) et sur IE8 tout son travail j Très bien. Je reçois:
OK: Root-level SWF loaded: http://127.0.0.1/akts/ThinSlicerRunner.swf
OK: Policy file accepted: http://localhost/crossdomain.xml
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at http://localhost/olapbin/msmdpump.dll by requestor from http://127.0.0.1/akts/ThinSlicerRunner.swf
OK: Searching for <allow-http-request-headers-from> in policy files to authorize header sending to URL http://localhost/olapbin/msmdpump.dll by requestor from http://127.0.0.1/akts/ThinSlicerRunner.swf
OK: Request for resource at http://localhost/olapbin/msmdpump.dll by requestor from http://127.0.0.1/akts/ThinSlicerRunner.swf is permitted due to policy file at http://localhost/crossdomain.xml
sur Chrome et Firefox je reçois juste:
OK: Root-level SWF loaded: http://localhost/akts/ThinSlicerRunner.swf
OK: Policy file accepted: http://localhost/crossdomain.xml
et rien d'autre ... aucune tentative d'autoriser les demandes de HTTPService.
Dans le principal journal des erreurs flex je reçois:
*** Security Sandbox Violation ***
Connection to
http://localhost/olapbin/msmdpump.dll
halted - not permitted from http://localhost/akts/ThinSlicerRunner.swf
Ce qui ne semble pas quand je lance la même chose de IE8. Une idée de ce qui se passe ???
AS ... PLUS CODE DEMANDÉ
principale demande d'envoi:
var connection:TsConnection = this.__connection;
var token:AsyncToken = new AsyncToken(null);
connection.service.request = this.__curSoapRequest;
var actualToken:AsyncToken = connection.service.send();
__tokenArr.push(actualToken);
var responder:AsyncResponder = new AsyncResponder(resultHandler, faultHandler, actualToken);
__responderArr.push(responder);
actualToken.addResponder(responder);
objet Connection: Faits saillants
public function init():void {
//Initialize the service object needed to query the server
this.__service = new HTTPService;
this.__service.method = "POST";
this.__service.contentType = "application/xml";
this.__service.resultFormat = "e4x";
this.__service.headers = getHeaders();
this.__service.url = this.__model.xmlaUrl;
this.__initialized = true;
}
public function get service():HTTPService {
return this.__service;
}
private function getHeaders():Object {
var o:Object = {};
o["SOAPAction"] = '"urn:schemas-microsoft-com:xml-analysis:Discover"';
o["Content-Type"] = "text/xml";
return o;
}
Merci pour votre aide ... Espérons que cela aide les autres quand fixe . ;-)
Shaun http://www.vidgridz.com/
montrez votre code s'il vous plait. – Eugene
plus de code ajouté – blissweb