• SpectrumGFA
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
The code:


private function login():void {

    var policyUrl:String = "http://www.salesforce.com/services/crossdomain.xml";
       
    Util.debug(this, "loading the policy file: " + policyUrl);
    Security.loadPolicyFile(policyUrl);


    var lr:LoginRequest = new LoginRequest;
    lr.server_url = Application.application.parameters.server_url;   
    lr.session_id = Application.application.parameters.session_id;
    lr.username = 'username@domain.com';
    lr.password = 'password';           
    lr.callback = new AsyncResponder(loginResult, loginFault);


    Util.debug(this, 'apex.login ( ' +ObjectUtil.toString(lr) +'\n);' );   
    apex.login(lr);

}

private function loginResult(result:Object):void {
    Alert.show("Success");
}

private function loginFault(fault:Object):void {
    Alert.show("Login error!");
}


It always goes straight to loginFault, and here is my error message:


Warning: Ignoring invalid <allow-access-from> tag for domain 'http://www3.stream.co.jp' in policy file at http://www.salesforce.com/crossdomain.xml
Warning: Ignoring invalid <allow-access-from> tag for domain 'http://salesforce.sitestream.com' in policy file at http://www.salesforce.com/crossdomain.xml

[FaultEvent fault=[RPC
    Fault faultString="HTTP request error"
    faultCode="Server.Error.Request"
    faultDetail="Error: [IOErrorEvent
                                        type="ioError"
                                        bubbles=false
                                        cancelable=false
                                        eventPhase=2
                                        text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/9.0"].
    URL: http://www.salesforce.com/services/Soap/u/9.0"]
    messageId="FA86E4BC-40CE-E542-80D0-0F0DF9206919"
    type="fault"
    bubbles=false
    cancelable=true
    eventPhase=2]


I know this is from not having a crossdomain file, but even when I explicitly set one, it defaults to http://www.salesforce.com/crossdomain.xml and NOT http://www.salesforce.com/services/crossdomain.xml. 

Help? :(  
We are currently developing a Flex application to run as a custom S-Control in our SalesForce instance. 
 
I want to load a remote SWF file into our custom S-Control.  I can successfully login on the S-Control, but when I try to load the remote SWF, it says "parent cannot access na5.salesforce.com/servlet/servlet.FileDownload...etc ". 
 
 
I login on both SWF files and set the loadPolicyFile to salesforce's crossdomain file, but I still get this error... any clues?
The code:


private function login():void {

    var policyUrl:String = "http://www.salesforce.com/services/crossdomain.xml";
       
    Util.debug(this, "loading the policy file: " + policyUrl);
    Security.loadPolicyFile(policyUrl);


    var lr:LoginRequest = new LoginRequest;
    lr.server_url = Application.application.parameters.server_url;   
    lr.session_id = Application.application.parameters.session_id;
    lr.username = 'username@domain.com';
    lr.password = 'password';           
    lr.callback = new AsyncResponder(loginResult, loginFault);


    Util.debug(this, 'apex.login ( ' +ObjectUtil.toString(lr) +'\n);' );   
    apex.login(lr);

}

private function loginResult(result:Object):void {
    Alert.show("Success");
}

private function loginFault(fault:Object):void {
    Alert.show("Login error!");
}


It always goes straight to loginFault, and here is my error message:


Warning: Ignoring invalid <allow-access-from> tag for domain 'http://www3.stream.co.jp' in policy file at http://www.salesforce.com/crossdomain.xml
Warning: Ignoring invalid <allow-access-from> tag for domain 'http://salesforce.sitestream.com' in policy file at http://www.salesforce.com/crossdomain.xml

[FaultEvent fault=[RPC
    Fault faultString="HTTP request error"
    faultCode="Server.Error.Request"
    faultDetail="Error: [IOErrorEvent
                                        type="ioError"
                                        bubbles=false
                                        cancelable=false
                                        eventPhase=2
                                        text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/9.0"].
    URL: http://www.salesforce.com/services/Soap/u/9.0"]
    messageId="FA86E4BC-40CE-E542-80D0-0F0DF9206919"
    type="fault"
    bubbles=false
    cancelable=true
    eventPhase=2]


I know this is from not having a crossdomain file, but even when I explicitly set one, it defaults to http://www.salesforce.com/crossdomain.xml and NOT http://www.salesforce.com/services/crossdomain.xml. 

Help? :(  
We are currently developing a Flex application to run as a custom S-Control in our SalesForce instance. 
 
I want to load a remote SWF file into our custom S-Control.  I can successfully login on the S-Control, but when I try to load the remote SWF, it says "parent cannot access na5.salesforce.com/servlet/servlet.FileDownload...etc ". 
 
 
I login on both SWF files and set the loadPolicyFile to salesforce's crossdomain file, but I still get this error... any clues?
I'm trying to get a simple HelloWorld application working on my local machine using the FlexBuilder v3 Beta and the most recent SFC Flex Toolkit. I've followed the code exactly as documented in the samples found online,  various screencasts, and even in downloaded the samples. Now matter what I do, I get the following error in the login step:

[FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] messageId="274B3986-6992-1A79-1276-D7DF53D645C3" type="fault" bubbles=false cancelable=true eventPhase=2]

The login function I'm using is below:
    private function doLogin():void
    {
     var lr:LoginRequest = new LoginRequest();
     lr.username = "devlogin@blablabla.com";
     lr.password = "devloginpassword";
     lr.server_url = "http://www.salesforce.com/services/Soap/u/9.0";
     lr.callback = new AsyncResponder(loginResult, loginFault);
     conn.login(lr);
    }
What am I doing wrong?

Thanks for any help,

Mike