This content has been marked as final. Show 7 replies
I've had mixed results with RemoteObject. It works beautifully on one system (http), but I've tried for 3-4 months to get it to work on another system (https) with no luck at all. It made no difference how I configured the config-files, it just never worked on SSL.
I resorted to using the only approach I could get to function correctly (see below). Hope this helps.
private var acData:ArrayCollection;
/* Connection Variables */
public var svc:NetConnection;
public var gateWay:String = "https://your-server/flashservices/gateway/";
public var locStr:String = "Acct.components.users";
private function initApp ():void
svc = new NetConnection( );
svc.connect( gateWay );
svc.call( locStr , new Responder(onResult, onError));
private function onResult(result:Array):void
// trace ( 'result:'+result['Cols'] );
acData= new ArrayCollection ( result );
private function onError(error:Object):void
I got SSL with cf-amf-secure channel working yesterday. IE is a big pain, make sure you put in the add-no-cache property in your channel setup. Also you may need to make a keytool file with java.
Here is a link I was provided:
hs_ted, I'm actually getting the app to respond in FireFox using your call method, but IE is showing up blank. It might be becauset I've only disabled my other code as apposed to working your example from scratch. I'll be trying some other things out with this. Thanks.
Bryan, thanks for the link. The additional links from that page provided some good information about IE caching with SSL, but nothing I did made the application work in IE. I was able to get a very simple app using RemoteObject working in FireFox though, so that's a step.
I've spent a few weeks working on a fairly sophisticated Flex application, and I'm extremely disheartened now that I've realized migration to SSL is going to be a hurdle. I really don't have a choice but to figure this out, unless I want to redo all of my RemoteObject calls, or... <gasp> switch to Silverlight.
Thanks for both of your suggestions.
Update: I can't get even the simplest Flex application to not display the "page contains both secure and nonsecure items" error in IE. I have to believe that I'm missing something simple, but I'm blue in the face from checking everything. I even changed all of the plugin link-outs to 'https:'
My Super-Advanced Flex Application looks like this:
I found a lot of suggestions when Googling that error message a couple weeks ago. I only see it when refreshing a Flex app (99% of the time anyway). I've no suggestions on that problem other than Google. Sorry.
I've now been able to get SSL working with RemoteObject on a different server. I believe there is an issue on the original server related to the configuration of the SSL certificate, but I'm not yet certain. One was professionally installed and the other was likely hacked together by an IT-wannabe.
On the new server, I was able to get it working by establishing a second definition in the services-config.xml file that I called, "ColdFusionSecure". At first, it only worked in FireFox, but then I added the no-cach line and it began working in IE as well. Now, I've just got to figure out why it's not working on the other server. If anyone has knowledge of SSL issues that could help me, I'd appreciate your thoughts. Thanks again for the helpful suggestions.
I finally got it working, and it was not related to the SSL certificate. The final fixes were a combination of things I had tried before, but I apparently kept missing the right combination or something. Here's what I did:
- Instead of using the destination "ColdFusion" in my RemoteObject, I used "ColdFusionSecure"
- I added "ColdFusionSecure" as an additional definition in my remoting-config.xml file.
- I referenced this definition to the "my-cfamf-secure" channel in my services-config.xml file
- I added the <add-no-cache-headers>false</add-no-cache-headers> code to the properties of that channel.
I may not fully understand what I had wrong, but it definitely works now. Thanks again for the help.