locked
"Access is denied" in ASPX in iframe RRS feed

  • Question

  • I'am testing gmaps API in CRM 4.0 and hitted a broblem. I have created a new tab with Iframe to account. I try to show a location of the accounts address in google map in that Iframe. I call The gmaps API from the ASPX page which I call from Iframe.

    If I hard code the address to my ASPX (as shown in out commented line in example code) everything works ok. If I try to get the address from CRM ("var address1 = parent.document.forms[0].all.address1_line1.DataValue"

     ) I get the "Access is denied" -error. I have unchecked the "Restrict cross-frame scripting" checkbox from Iframe. What else could cause the error? 

    Here is a part of my ASPX if it helps.

     

    <head id="Head1" runat="server">

        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

        <title>Google Maps JavaScript API test</title>

     

        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAJIh-MGrD2eQfGwTiU7IEjxT6yIUegKcorNqXwaLgDI4a5ZhTlhS7eRZi2OjQsyZywoAwxjCtmyiRBA" type="text/javascript">

        </script>

     

        <script type="text/javascript">

           var map = null;

           var geocoder = null;

     

           function initialize() {

             if (GBrowserIsCompatible()) {

               map = new GMap2(document.getElementById("map"));

               geocoder = new GClientGeocoder();

              

               map.setMapType(G_NORMAL_MAP);

               map.addControl(new GLargeMapControl());

         

               //Get adress from CRM

               // !!! "Access is denied" comes here !!!

              var address1 = parent.document.forms[0].all.address1_line1.DataValue;

         

              // This works ok

              // var address1 = "Mannerheimintie";

              showAddress(address1);

            }

         }

    </script>

    </head>

    Monday, December 1, 2008 10:24 AM

Answers

  • Sounds like your custom aspx page does not know who the calling user is. Perhaps your aspx page is not placed right on your IIS. Try placing your aspx page in the ISV folder under the crm website. Remember to change the IFRAME URL to this new location.

     

    /c

     

    Monday, December 1, 2008 12:19 PM
  • My ASPX was not placed right. I put in to ISV -folder and now it works. Thank You.

    Tuesday, December 2, 2008 8:27 AM

All replies

  • Sounds like your custom aspx page does not know who the calling user is. Perhaps your aspx page is not placed right on your IIS. Try placing your aspx page in the ISV folder under the crm website. Remember to change the IFRAME URL to this new location.

     

    /c

     

    Monday, December 1, 2008 12:19 PM
  • My ASPX was not placed right. I put in to ISV -folder and now it works. Thank You.

    Tuesday, December 2, 2008 8:27 AM