WinJS.xhr: Network Error 0x2efd, Could not complete the operation due to error 00002efd

Jirka Meluzin picture Jirka Meluzin · Nov 1, 2012 · Viewed 32.1k times · Source

I have problem with WinJS.xhr when developing a Windows 8 Metro application in JavaScript.

WinJS.xhr({ url: "http://www.seznam.cz"});

When above code is executed, I see in log:

SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete
the operation due to error 00002efd.

I have enabled "Internet (Client)" capability in manifest.

Maybe the problem is because I am behind proxy and using VPN, but I can access internet using Google Chrome (I just need to authorize, otherwise HTTP Status 407 - proxy authorization needed).

How can I fix it?

[EDIT] So I found that it is probably related to the VPN I have to use (Cisco VPN Client). When I disable the VPN, even when I am behind the proxy (I use the LAN, with VPN I use WiFi), the request works. Maybe it is only Cisco VPN related. I had to modify registry as it is described here http://verbalprocessor.com/2012/09/17/windows-8-and-cisco-vpn-client/

Also interesting is that a few Metro apps work (maps) and some do not work (windows store) when I am behind proxy.

Just a notice: I have explored Windows.Networking.Connectivity and in both cases (with/without VPN) I get NetworkConnectivityLevel == "Local Access" (because I am behind the proxy probably).

Answer

anderaus picture anderaus · Feb 6, 2013

I got the same error when connected to my workplace SSL/VPN connection (from Juniper).

Opening the .appxmanifest file and adding the "Private Networks (Home & Server)" capability solved the issue.

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