1 Reply Latest reply on Aug 4, 2011 7:24 PM by Don Kerr

    flex remoteobject and secure logins



      i'm having a problem at my company with flex remote objects and secure logins. here is my issue:


      when you are within the corporate firewall flex works fine with the remoteobject. but when you are a non-employee and you login through a secure portal a juniper network server converts all the urls and encrypts them differently. when the user loads up the flex app an error is thrown because it fails to connect.


      my question is how can i setup the remote object to work?


      this is what the juniper server does... say i have this url = "http://www.google.com/test/login/login.cfm"


      the juniper network converts it to this... "https://secure.google.com/test/login/",DanaInfo=google.com,SSO=P+login.cfm"


      any ideas?

        • 1. Re: flex remoteobject and secure logins
          Don Kerr Level 3

          I'm assuming your inability to connect via remoteObject is due to having different domains. But, I've not seen your error.


          I've had similar situation with a client.  They needed the flexibility of two different urls loading the same app.  One was through VPN, the other not.


          If this is your issue, you might find this useful below ...


          In my case, I'm using Flex/ColdFusion.  So, what I did is dynamically set the RO's endpoint url to match whichever url is attempting to load the swf and connect via remoteObject.  This way the domains match and the RO can connect to the flex2gateway.


          import mx.core.FlexGlobals;

          [Bindable] public var g_HostString:String;

          [Bindable] public var g_ContextRoot:String;

          [Bindable] public var g_BaseURL:String;


          private function getHostName():void {

          g_BaseURL = FlexGlobals.topLevelApplication.url;

          var pattern1:RegExp = new RegExp("https://[^/]*/");

          var pattern2:RegExp = new RegExp("http://[^/]*/");


          if (pattern1.test(g_BaseURL) == true) {

          g_HostString = pattern1.exec(g_BaseURL).toString();


          else if(pattern2.test(g_BaseURL) == true) {

          g_HostString = pattern2.exec(g_BaseURL).toString();





          g_HostString = "http://localhost:8500/"




          roEndpoint = g_HostString+'flex2gateway/';









          initApp() calls the remoteObject AFTER the current domain is set as the endpoint url



          id="cfdata" showBusyCursor="true"

          destination="ColdFusion" endpoint="{roEndpoint}" ...



          Not sure if this helps, but it works great in my case with ColdFusion9.