none
"SecurityError" occurs in Map Image Generator Module in IE RRS feed

  • Question

  • Hello,

     We trying to implement Bing Maps MapImageGenerator Module, but we face one error (SecurityError) in MapImageGenerator.js file. This error is only replicate on IE, On Google Chrome and FireFox it works properly. We attach error screen shot as follows.

    Is Any solution for this ? 

    Thank You

     
    Monday, June 11, 2018 2:44 PM

All replies

  • Hi Vikas,

    Would you please share the error text from the IE web console tab? You may need to enable CORS on IIS to get this to work.

    Thanks

    Monday, June 11, 2018 7:22 PM
    Moderator
  • hello,

      Thanks for the reply, the screen shot that we provided in previous message is IE web console tab screen shot, and about the error text we highlighted in red color box i.e "SecurityError".

      And about your second solution we attach enableCORS: true property to map.

       var map = new Microsoft.Maps.Map(document.querySelector("#divID"), {
                            credentials: credentials,
                            enableCORS: true

    Thank You

    Tuesday, June 12, 2018 5:26 AM
  • Hi Vikas

    This appears to be a CORS issue. Cross-origin resource sharing allows restricted resources on a web page to be requested from another domain outside the domain where the first resource was served. The following blog post also has an explanation:
    https://stackoverflow.com/questions/36958999/cors-is-it-a-client-side-thing-a-server-side-thing-or-a-transport-level-thin

    You can enable CORS on IIS 7 by implementing the solution here:
    https://enable-cors.org/server_iis7.html

    The server needs to state the allowed origins. Please engage your Admins to apply this fix.

    Thanks

    Tuesday, June 12, 2018 4:38 PM
    Moderator