none
Error "This page is accessing information that is not under its control…" RRS feed

  • Question

  • We are using MSXML2.XMLHTTP60 to get the image files from server.

    We are using below VBA syntax to get the file

       

    With XMLHTTPREQUEST
               .Open "GET", Url, False
               .setrequestheader "Origin", ImageLb
               .setrequestheader "User-Agent", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081130 Minefield/3.1b3pre"
               .setrequestheader "Access-Control-Allow-Origin", ImageLb
               .setrequestheader "Access-Control-Allow-Credentials", True
               .setrequestheader "Content-Type", "image/jpeg"
               .setrequestheader "Authorization", <JWTAccessTokenKey>
               .send
               MsgBox .getallresponseheaders

    End With

    However, there is any warning message "This page is accessing information that is not under its control" and we need to click "yes" to download the  image.

    We know that  the reason of this warning message is because IE security setting has been enabled 

     https://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/how-do-i-get-rid-of-this-page-is-accessing/ca546963-a4df-4ff0-b524-5d46c1232b15

    Unfortunately, we cannot update IE security setting because it is blocked by our company information security team.

    Is there any header of the XMLHTTPREQUEST that can helps to prevent this warning ? Above headers setting do not work.

    Monday, June 5, 2017 6:49 AM

All replies

  • Hi Wicky Tse,

    I try to find information regarding this error and I find that if we follow steps below then we can solve this issue.

    1. Go to Tools->Internet Options.
    2. Security tab.
    3. Under "Internet", click "Custom level..."
    4. Under "Misc.", check value of "Access data sources across domains".

    but I can see that you are not able to change settings as your company not allowed you to change it.

    the issue is related with Internet Explorer. so I did not get any solution in VBA.

    you need to ask the administrator to get the permission to change this settings to solve the issue.

    further , you can ask the same question on Internet Explorer forum. there are specific forum for Internet Explorer which handles IE related issues.

    it is possible that they have any extra information that may help you to solve the issue.

    1. Internet Explorer 8, 9, 10, 11
    2. Internet Explorer Web Development

    Regards

    Deepak 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 6, 2017 1:35 AM
    Moderator
  • Hi Wicky,

    As you known, this is related with IE and XMLHTTPREQUEST which is called CORS issue.

    Is the image server controlled by you? If it is, you could enable CORS at the server side, and then this issue would disappear.

    If not, I think you need a proxy to send request to server, and then send request to this proxy from vba for a workaround.

    We could not resolve this issue from client side.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 28, 2017 6:20 AM