Hi,
I faced the same problem and after getting the hint from the group about crossdoamin.xml.
I searched for it on web and got the following info.

To automatically give a movie loaded from yoursite.com access to data on www.yoursite.com, you must use a cross-domain policy file. The following steps describe how the owner of yoursite.com would add a cross-domain policy file to her site, thus allowing data to flow from yoursite.com to www.yoursite.com, and vice versa.

  1. Create a new text file named crossdomain.xml.
  2. Open crossdomain.xml in a text editor.
  3. Add the following XML code to the file:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy
    SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd ">
    <cross-domain-policy>
    <allow-access-from domain="www.yoursite.com" />
    <allow-access-from domain=" yoursite.com" />
    </cross-domain-policy>
  4. Save the file.
  5. Upload the file to the root directory of yoursite.com (so that the file can be accessed at http://www.yoursite.com/crossdomain.xml ).
Also please restart your webserver after puttting the crossdomain.xml. i hope this helps

Thanks
Sachin Gaur

On 5/1/06, oca_gw <[EMAIL PROTECTED]> wrote:


Hi Again all.

To further demonstrate this problem, I have developed the following
sample application:



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
layout="absolute" width="763" height="371">

      <mx:HTTPService
            id="myService"
            url="">             resultFormat="text"/>
      <mx:TextArea x="10" y="220" width="155" height="141"
text="{myDataGrid.selectedItem.SiteTitle} -
{myDataGrid.selectedItem.Address}"/>
      <mx:TextArea x="173" y="11" width="580" height="350"
text="{myService.result}"/>
      <mx:DataGrid x="10" y="11" width="155" height="141" id="myDataGrid"
click="myService.send();">
            <mx:columns>
                  <mx:DataGridColumn headerText="Site" dataField="SiteTitle"/>
            </mx:columns>
            <mx:dataProvider>
                  <mx:Array>
                        <mx:Object SiteTitle="Google" Address="http://www.google.com"/>
                        <mx:Object SiteTitle="Yahoo" Address="http://www.yahoo.com"/>
                        <mx:Object SiteTitle="Graham Weldon"
Address="http://graham.weldon.ath.cx"/>
                  </mx:Array>
            </mx:dataProvider>
      </mx:DataGrid>
     
</mx:Application>





This works fine when i click "Run" in the Flex 2,0 beta 2 builder, to
launch it as a SWF/HTML through the local browser, but as soon as I
put it on the webserver to be deployed and publically accessible, the
Security errors popup when the HTTPService should send().

Any thoughts?

Cheers, Regards,

Graham Weldon
Web Development Manager
Object Connections


--- In flexcoders@yahoogroups.com, "oca_gw" <[EMAIL PROTECTED]> wrote:
>
> Hi All.
>
> I'm working with Flex 2.0 beta 2
>
> This response interested me, as I have been experiencing some issues
> with HTTP Services, and the usage of dynamic destinations.
>
> One example that claims to be able to do this is GuniX technology's
> administrator's RSS2.0 Reader version 0.2. (
> http://www.g-unix.com/bin/rss/index.swf )
> Running this sample, entering in any RSS feed causes the following
> error to pop up:
>
> Error: faultCode:Channel.Security.Error faultString:'Security error
> accessing url' faultDetail:'Destination: DefaultHTTP'
>       at
>
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
>       at flash.events::EventDispatcher/dispatchEvent()
>       at mx.messaging::MessageAgent/fault()
>       at mx.messaging::Producer/fault()
>       at ::DirectHTTPMessageResponder/securityErrorHandler()
>       at flash.events::EventDispatcher/dispatchEvent()
>       at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
>
>
> This is the same error I got while programming my weather.com sample:
> http://graham.weldon.ath.cx/?page=projects&id=weather
>
> I solved the weather sample by creating a PHP file that fetched all
> XML data from the weather.com service, rather than having flex access
> the URLs directly.
>
> Intially, I was attempting to databind the URL similar to:
>
> mx:HTTPService
>    id="myService"
>    url="" href="http://www.weather.com/blah/blah/%7BmyLocationId%7D?key=%7BmyKey%7D" target="_blank" >http://www.weather.com/blah/blah/{myLocationId}?key={myKey} "
>    result="processResultXML(event);"
>    resultFormat="e4x"
>
> This didn't work, and raised the same error as seen on GuniX's sample.
> I felt that this was due to the dynamic nature of the URL ( since it
> incorporates the location ID in the URL ) causing the error.
>
> GuniX's sample RSS reader will always have dynamic URLs, since it
> databinds the url="" field to: textBox.text.
>
> The reason I have posted this in response to Darren's message, was
> that I am unsure as to whether or not a cross-domain.xml file is the
> solution, especially in the case of reading RSS feeds from remote
> servers that the developer cannot deploy an XML file on. (also, not
> sure if this is still applicable for Flex 2.0 beta 2)
>
> Is there a way to allow dynamic URLs in HTTPServices, without causing
> this Security error?
>
>
> Regards,
> Graham Weldon
> Web Development Manager
> Object Connections
>
>
> --- In flexcoders@yahoogroups.com, "Darren Houle" <lokka_@> wrote:
> >
> > Pretty sure you have to place a crossdomain file on the http server
> you're
> > trying to hit if you're going to run the swf off your desktop.
> Normally the
> > swf has rights to hit the server it's served from, but when you run
> a swf
> > file sitting on your desktop it's not "served" from any server, so
> any web
> > server you specify would be "foreign" and would need to have a
> crossdomain
> > file that allowed that swf to access it.
> >
> > Darren
> >
> >
> >
> > >From: "compengguy" <sachingaur.83@>
> > >Reply-To: flexcoders@yahoogroups.com
> > >To: flexcoders@yahoogroups.com
> > >Subject: [flexcoders] Help!
> > >Date: Thu, 27 Apr 2006 13:28:15 -0000
> > >
> > >Hi all,
> > >I am making a page for my teamsite where i am sending the sql
query in
> > >the URL. which returns an xml file. When i compile and run this code
> > >in Flex Builder 2.0 , It runs fine but when i take that swf file and
> > >run it seperately It gives the following errors.
> > >
> > >       *****************************************************
> > >Error: faultCode:Channel.Security.Error faultString:'Security error
> > >accessing url' faultDetail:'Destination: DefaultHTTP'
> > >      at
> >
>
>mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
> > >      at flash.events::EventDispatcher/dispatchEvent()
> > >      at mx.messaging::MessageAgent/fault()
> > >      at mx.messaging::Producer/fault()
> > >      at ::DirectHTTPMessageResponder/securityErrorHandler()
> > >      at flash.events::EventDispatcher/dispatchEvent()
> > >      at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
> > >       ********************************************************
> > >what i need to do,to not to have this warning because after the
> > >warning it not fetches the data.
> > >
> > >The code snippet is
> > ><mx:HTTPService id="xml" url="" URL" useProxy="false"/>
> > >
> > >so can anybody suggest what i need to do ?
> > >
> > >Thanks
> > >Sachin Gaur
> > >
> > >
> > >
> > >
> > >
> > >
> > >--
> > >Flexcoders Mailing List
> > >FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > >Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > >Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> >
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to