locked
WinjS WCF is call is not working

    Question

  • WinJS.xhr call to WCF service hosted in a different machine in same domain is not working . But the same code working fine with localhost  URL . We can browse the WCF via IE which is in a different machine.

    Error message : 

    XMLHttpRequest: Network Error

    Friday, October 26, 2012 8:16 AM

All replies

  • Can you reproduce this by hosting the service (or a similar contract with no real implementation) somewhere on the Internet that we can see?

    Cheers,
    Caio Proiete

     


    Caio Proiete
    Microsoft MVP, MCT, MCPD, MCTS, MCSD
    http://caioproiete.net

    Friday, October 26, 2012 2:28 PM
  • WinJS.xhr call to a WCF which is in cloud is working fine but when we host it in a local machine other than the local host its failing.

    We have bypassed the proxy setting in IE setting giving the host names IP.

    Internet Options>Connections>LAN settings>Advanced>Do not use proxy server for addresses beginning with:

    We can browse the WCF via Internet Explorer without any issue

    Detail error is given below.

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

    Monday, October 29, 2012 9:49 AM
  • See this: https://gyorgybalassy.wordpress.com/category/windows-8/page/2/ (search for network error on page)

    You need to allow your app to connect to servers in the local network in your manifest file (-> Capabilities -> Private Networks(Client & Server) ) . Only "Internet Access" is enabled by default. I actually wasted a whole week to find that solution.


    • Edited by alex_fost Wednesday, November 21, 2012 10:21 AM
    Wednesday, November 21, 2012 10:20 AM
  • Make sure you have these items checked under Capabilities in your manifest:

    Internet (Client)

    and

    Private Networks

    If this does not work, open the JavaScript console when debugging and see if there are messages in there.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, November 21, 2012 2:21 PM
    Moderator