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

后端 未结 3 1451
星月不相逢
星月不相逢 2020-12-10 05:57

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

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

Whe

相关标签:
3条回答
  • 2020-12-10 06:18

    This solution worked for me (see forums link below)... essentially, you need to add the server's certificate to the Windows Store App manifest (also be sure your manfiest "Capabilities" are set to at least "InternetClient"). You can get the server's certificate by exporting it from your browser, save is as a ".der" file. Using Firefox was easier than IE in doing this (From FF, browse to the target domain that has the certificate, then right click on the page > Page Info > Security tab > Details tab > Export button > save as ".der".

    http://social.msdn.microsoft.com/Forums/en-ZA/winappswithcsharp/thread/4a776e8c-0e10-4f03-908f-7f765d914080?prof=required

    This solution seems absurd - so bear in mind, this may only be necessary for sites that are using self-signed certificates, like in a development environment, because this process was not necessary for other production sites.

    0 讨论(0)
  • 2020-12-10 06:27

    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>
    
    0 讨论(0)
  • 2020-12-10 06:40

    The proper way to do this was posted on the MSDN forums, it didn't work for me but the following did


    config.xml

    ...
    
    <platform name="windows"> 
         <config-file target="package.appxmanifest"> 
             <DeviceCapability Name="privateNetworkClientServer" /> 
         </config-file>
         ...
     </platform> 
    

    These will be merged with your other capabilities

    0 讨论(0)
提交回复
热议问题