Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Permission Denied due to cross domain.

    We are having some issue by running SmartClient server with Messaging module in a separate server and the webapp using the feature in a different server.

    Smartclient Server: https://sc.xyz.com/

    Webapp Server: https://web.xyz.com/

    We get this Permission Denied issue in the browser, we tried setting the document.domain to xyz.com in the webapp but not sure how to sync in the Smartclient server to recognize as xyz.com


    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)
    Timestamp: Thu, 27 Jan 2011 22:42:16 UTC

    Message: Permission denied
    Line: 1099
    Char: 1
    Code: 0
    URI: https://sc.xyz.com/web/isomorphic/system/modules/ISC_Core.js?isc_version=7.0rc4.js


    SmartClient version: 7.0rc4 Power Edition.

    This is urgent please respond as soon as possible.
    Thanks.

    #2
    Do the actual domains involved actually have one more segment? Eg, sc.foo.bar.com and web.foo.bar.com?

    Comment


      #3
      The urls are

      Smartclient - https://sc-dev.xyz.com/

      Webapp - https://web-dev.xyz.com/

      Comment


        #4
        OK there's already code in place to automatically handle this. If you try hitting the Messaging Servlet directly, you'll see it begin by sending:

        document.domain = document.domain = document.domain.replace(/.*?\./, '');
        Something else is wrong.. very carefully check your cross-domain settings and verify that you can cross the domain boundary with a normal iframe (what the Messaging module does). Once you can do that, the same settings will work with the Messaging module.

        Comment


          #5
          Yes, I can access a JSP in the Smartclient server in my webapps as the src of an iframe.

          Whereas Smartclient library throwing permisson denied.

          Is there a way to hardcode the domain name, to avoid this issue in smartclient libraries or config files.

          Comment


            #6
            It says permission denied at line 1099 and the line points to

            _11.open(_4,_2,!_9);

            where

            _11{...}IXMLHTTPRequest

            _4 "POST" String

            _2 "http://sc-dev.xyz.com:8088/web/isomorphic/IDACall?isc_rpc=1&isc_v=7.0rc4&isc_xhr=1&isc_dd=xyz.com&isc_tnum=0" String

            !_9 true Boolean

            Comment


              #7
              I'm also able to access a simple SmartClient page in an iframe, whereas the other action which makes a IDACall to subscribe on realtime modules fails due to Permission Denied.

              Appreciate if you can provide any information, also found another forum that has

              http://forums.smartclient.com/showthread.php?t=6155&highlight=Permission+denied

              Comment


                #8
                The MessagingServlet can be placed on another hostname, IDACall and other services based on XMLHttpRequest cannot (browsers do not support this).

                Comment


                  #9
                  Even if the IDACall goes to the same domain?

                  Comment


                    #10
                    ?

                    To restate, IDACall and anything based on XMLHttpRequest must go to the same host the webpage was loaded from (exact host, not document.domain value). Messaging can contact another host with matching document.domain.

                    Comment

                    Working...
                    X