The RPC Fault Security Error that wasn’t
In the first chapter of our upcoming book Professional Flex 3, I built a simple RSS reader in just a few lines of code to demonstrate how easy it is to build a Flex application. I expanded on this application in a few recent articles at Community MX, creating a mini RSS feed reader for all the book authors. All was well, until one of our tech editors Matthew Fabb, told me that the reader I built was producing a dreaded security error. Good catch Matt!
Here’s the original RSS reader code used in the book:
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="feed://http://www.adobe.com/2006/mxml"
- layout="absolute" creationComplete="RSSFeed.send();">
- <mx:HTTPService id="RSSFeed" url="feed://http//www.joeflash.ca/blog/feed/"/>
- <mx:List id="postTitles" labelField="title" left="20" right="20" top="20"
- dataProvider="{RSSFeed.lastResult.rss.channel.item}"/>
- <mx:TextArea htmlText="{postTitles.selectedItem.description}"
- left="20" right="20" top="190" height="200"/>
- <mx:Button label="Go to page" left="20" top="400"
- click="navigateToURL(new URLRequest(postTitles.selectedItem.link));" />
- </mx:Application>
I tried it locally, and no security error, of course. I loaded it onto my server, and I got the following error:
[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
...
1 Comment