Professional Web Applications Themes

CROSS DOMAIN POLICY - Macromedia Flex General Discussion

Flex 1.5 HI anyone told me why to use the crossdomain policy and where to put the crossdomain.xml file in an webapplication(Web Server) is it in WEB-INF/ or in WEB-INF/Flex/ Thanks in advance!...

  1. #1

    Default CROSS DOMAIN POLICY

    Flex 1.5
    HI anyone told me why to use the crossdomain policy and where to put the
    crossdomain.xml file in an webapplication(Web Server)
    is it in WEB-INF/
    or in
    WEB-INF/Flex/

    Thanks in advance!


    TIPLVinay Guest

  2. #2

    Default Re: CROSS DOMAIN POLICY

    It actaully goes in the very top level of the web site or application.

    In my case, I have a flex app at localhost:8080 that needs permission to talk
    to an asp.net application on IIS. I had to put the crossdomain file in the
    root of the IIS virtual folder.

    In a pure J2EE situation, I believe it should go in the first folder under the
    server (maybe IN the server folder). The way I figured mine out was to put a
    copy in every folder in my app until it worked, then took them out one by one.

    Tracy

    ntsiii Guest

  3. #3

    Default Re: CROSS DOMAIN POLICY

    Is it required if you are calling a JSP(using HTTPServices) resides in the same web application.?
    TIPLVinay Guest

  4. #4

    Default Re: CROSS DOMAIN POLICY

    What is the url for the Flex app, and what is the url for the jsp?
    ntsiii Guest

  5. Moderated Post

    Default Re: CROSS DOMAIN POLICY

    Removed by Administrator
    TIPLVinay Guest
    Moderated Post

  6. #6

    Default Re: CROSS DOMAIN POLICY

    You do not need a crossdomain file in this case.

    Your problem may be that you have a typo in the flex-config in the whitelist url. cookie vs cookies.

    Tracy
    ntsiii Guest

  7. #7

    Default Re: CROSS DOMAIN POLICY

    No you do not need a crossdomain file in this sitation.

    Your problem may be the type in flex-config whitelist: check spelling, cookie vs cookies

    Tracy
    ntsiii Guest

  8. #8

    Default Re: CROSS DOMAIN POLICY

    No url is :
    [url]http://localhost:8080/FlexSite/JSP/jcookie.jsp[/url]

    plz suggest wht is wrong.

    And when we need crossdomain.xml in our flex application.
    TIPLVinay Guest

  9. #9

    Default Re: CROSS DOMAIN POLICY

    You need a cross domain file when you are not using the flex proxy and your
    application (Flex client running in Flash player) requests data from a domain
    that is different from the domain that served the flex app swf.

    Try using the global permissions setting. Just uncomment it, see if that
    fixes things. It is not a good idea to run with this setting in production.

    Tracy

    ntsiii Guest

  10. #10

    Default Re: CROSS DOMAIN POLICY

    Originally posted by: ntsiii
    You need a cross domain file when you are not using the flex proxy and your
    application (Flex client running in Flash player) requests data from a domain
    that is different from the domain that served the flex app swf.

    Try using the global permissions setting. Just uncomment it, see if that
    fixes things. It is not a good idea to run with this setting in production.

    Tracy



    TIPLVinay Guest

  11. #11

    Default Re: CROSS DOMAIN POLICY

    hey if others want to knoe whats cross domain policy,, then i think the whole
    problem and solution can be understood

    To Create a crossdomain policy file

    Your system might be configured to allow a Flex application to
    directly access server-side resources on different domains or
    different computers without going through a proxy. These operations
    fail under the following conditions:

    * When the Flex application's SWF file references a URL, and
    that URL is outside the exact domain of the SWF file that makes the
    request
    * When the Flex application's SWF file reference an HTTPS URL,
    and the SWF file that makes the request is not served over HTTPS

    To make a data service or asset available to SWF files in different
    domains or on different machines, use a crossdomain policy file on
    the server that hosts the data service or asset. A crossdomain
    policy file is an XML file that provides a way for the server to
    indicate that its data services and assets are available to SWF
    files served from certain domains, or from all domains. Any SWF
    file that is served from a domain specified by the server's policy
    file is permitted to access a data service or asset from that
    server. By default, place the crossdomain.xml at the root directory
    of the server that is serving the data.


    When a Flash doent attempts to access data from another domain,
    Flash Player attempts to load a policy file from that domain. If
    the domain of the Flash doent that is attempting to access the
    data is included in the policy file, the data is automatically
    accessible.

    Policy files function only on servers that communicate over HTTP,
    HTTPS,or FTP. The policy file is specific to the port and protocol
    of the server where it resides. For example, a policy file located at
    [url]https://www.adobe.com:8080/crossdomain.xml[/url] applies only to data
    loading calls made to [url]www.adobe.com[/url] over HTTPS at port 8080.

    An exception to this rule is the use of an XMLSocket object to
    connect to a socket server in another domain. In that case, an
    HTTP server running on port 80 in the same domain as the socket
    server must provide the policy file for the method call.

    The Flash Player ignores any policy file that is served using a
    cross-domain redirect. For example, if Flash Player request for
    <a target=_blank class=ftalternatingbarlinklarge
    href="http://www.mysite.com/crossdomain.xml">[url]http://www.mysite.com/crossdomain.x[/url]
    ml</a> redirects to
    <a target=_blank class=ftalternatingbarlinklarge
    href="http://elsewhere.mysite.com/crossdomain.xml,">[url]http://elsewhere.mysite.com/[/url]
    crossdomain.xml,</a> Flash Player
    ignores that policy file. Ensure that you do not use cross-domain
    redirects to serve policy files. (You can use redirects within the
    same domain.)

    The default policy file is named crossdomain.xml and resides at the
    root directory of the server that is serving the data. You can use the
    loadPolicyFile() method to access a nondefault policy file.

    In J2EE, web applications can have a different context roots, and you
    are not required to deploy any application to the default context
    root ("/"). This means that you cannot use a crossdomain.xml file in
    the web root without adding at least one web application at the default
    context root.

    poonamsheth Guest

  12. #12

    Default Re: CROSS DOMAIN POLICY

    Please answer the question asked.
    If you are running Tomcat: NO IIS; no Apache webserver.

    Nothing going through 80, everything through 8080 (say your developers box).
    [[ [localhost] vs [127.0.0.1] ]]

    Where on TOMCAT do you place the crossdomain.xml file.
    {myhost}:8080/myJavaWar-Context/.....

    Surely it does not go in myJavaWar-Context.
    The app context is in a directory different than the default webapps. Did not work from there either.

    Do you have to have a web server in front of the app server?
    Unregistered Guest

Similar Threads

  1. Will cross domain policy file work with http->https
    By arnoldchang in forum Macromedia Flex General Discussion
    Replies: 7
    Last Post: May 16th, 06:22 PM
  2. cross domain policy issues
    By dougwrx in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: May 14th, 11:47 PM
  3. location for cross domain policy file
    By toddclare in forum Macromedia Flash Player
    Replies: 0
    Last Post: December 4th, 08:21 PM
  4. Cross domain sessions
    By Treefrog in forum PHP Development
    Replies: 4
    Last Post: October 20th, 08:27 PM
  5. XP policy in NT4 domain
    By Forray Péter in forum Windows Server
    Replies: 1
    Last Post: July 2nd, 01:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139