Error SCRIPT7002 on REST calls from Windows 8

I have an apache cordova application that is compiled in Visual Studio 2013 Update 3 using Hybrid Tools CTP 2. It works as expected on all platforms except Windows 8. My REST calls do not work with this error.

SCRIPT7002: XMLHttpRequest: Network error 0x2efd, operation could not be completed due to error 00002efd.

How do I enable these prompts for Windows 8? I fixed a lot of problems by removing remote references to things and enabling them locally, but obviously I cannot do this for API services.

Thanks in advance!

+3


source to share


1 answer


For Windows 8 apps (and this is especially for 8 and 8.1), you need to provide the "Internet (client and server)" and "Private networks" capabilities in the package.windows80.appxmanifest file so that you can make REST calls through custom public and worker / private internet connections:

<Capabilities>
    <Capability Name="internetClientServer" />
    <Capability Name="privateNetworkClientServer" />
</Capabilities>

      



Here's a complete record of these capabilities:

https://msdn.microsoft.com/en-us/library/windows/apps/hh770532.aspx

+3


source







All Articles