WebView web service Access Denied Error RRS feed

  • Question

  • I'm working on a project for a customer that requires displaying an angularjs app through the WebView control.  The web content is part of the app package.  I'm getting an Access Denied error from the web content when it tries to hit a web service hosted by the customer.  From what I researched, it looks like the customer needs to add an allow condition to their service for the new Windows 8 app, but wanted to get some verification.  This is the error I see in the JavaScript Console when I run the app:

    XMLHttpRequest for https://<customer's service url here> required Cross Origin Resource Sharing (CORS).
    XMLHttpRequest for https://<customer's service url here> required CORS preflight.

    Origin ms-appx-web://70763c20-ee03-4e7d-acba-426478688865 not found in Access-Control-Allow-Origin header.
    XMLHttpRequest: Network Error 0x80070005, Access is denied.

    Friday, August 8, 2014 4:28 PM


  • Hi Bradley,

    >but wanted to get some verification.  

    Yes, the remote server need to accept this action. When a webpage makes an XHR request, Internet Explorer sends an origin header to the target server; the header contains the protocol scheme of the request (either http:// or https ://) and the hostname for the webpage making the request. If the target server approves the request, it returns an Access-Control-Allow-Origin header and the request is allowed to proceed. You can find the above explanation from the following link in Cross-Origin Resource Sharing (CORS) for XMLHttpRequest section.  http://msdn.microsoft.com/en-us/library/ie/hh673569(v=vs.85).aspx.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Bradley Bosak Wednesday, August 13, 2014 7:11 PM
    Monday, August 11, 2014 5:44 AM