Using AI in JavaScript Windows Store app RRS feed

  • Question

  • I am trying to use the AI javascript nuget version (ai.0.15.0-build12287.js) in my Windows Store app.

    var appInsights = new Microsoft.ApplicationInsights.AppInsights({ instrumentationKey: "xxxxxxxxx" });


    But as soon as AI.js tries to send the data buffer using xhr it fails on "xhr.open("POST", this._config.endpointUrl(), true);" with "Access Denied". The ai.js file is bundled with my app and I never had problems using POST requests in Windows Store Apps.

    Any ideas?

    Sample project here: http://1drv.ms/1d0P4MO

    Wednesday, June 17, 2015 12:49 PM


  • Nevermind. I solved the problem by using the WinRT HTTP client API.


    Now the code printed in my OP works and reports back to Azure.

    • Marked as answer by pkursawe Wednesday, June 17, 2015 7:54 PM
    Wednesday, June 17, 2015 7:54 PM