Microsoft Edge:XMLHttpRequest:网络错误0x2efd,由于错误00002efd而无法完成操作 [英] Microsoft Edge: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd

查看:395
本文介绍了Microsoft Edge:XMLHttpRequest:网络错误0x2efd,由于错误00002efd而无法完成操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只有一个页面html和Angularjs文件.

I have a single page html and Angularjs file.

App.js

angular
.module('vod', [])
.controller('moviesController', ['$http', function ($http) {
    var self = this;
    self.movies = [];
    $http.get('http://localhost:8080/movies/').then(function (response) {
        self.movies = response.data;
    }, function (errResponse) {
        console.error('Error while fetching movies');
    });
}]);

HTML

<!DOCTYPE html>
<html>
    <head>
        <title>Angular</title>
        <script src="angular.min.js"></script>
        <script src="app.js"></script>
    </head>
    <body ng-controller="moviesController as ctrl"
          ng-app="vod">
        <div ng-repeat="movie in ctrl.movies">
            <span ng-bind="movie.title"></span>
        </div>
    </body>
</html>

在Chrome上制作电影标题的效果很好,但会出现错误
SCRIPT7002: XMLHttpRequest: Network Error 0x2, The system cannot find the file specified

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

It works well on Chrome producing the movie titles but gives the errors
SCRIPT7002: XMLHttpRequest: Network Error 0x2, The system cannot find the file specified
and
SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd. on Microsoft Edge.

推荐答案

这是一篇过时的文章,但是如果今天发现类似的问题,一个新鲜的答复可能会帮助某些人学习.在Windows 10中,所有现代应用程序均在AppContainers中运行,隔离规则禁止将这些网络流量发送到本地计算机. Edge被视为现代应用程序,如下所示: https://blogs.windows .com/msedgedev/2015/05/11/microsoft-edge-building-a-safer-browser/

This is an old post but maybe a fresh reply will help somebody learn in case similar problems are found today. In Windows 10 all modern apps runs in AppContainers that are forbidden by isolation rules to send network traffic to the local computer. Edge is regarded as a modern app as seen here: https://blogs.windows.com/msedgedev/2015/05/11/microsoft-edge-building-a-safer-browser/

出于开发目的,您可能会发现诸如ngrok或回送之类的工具很有帮助.我确信应用程序隔离规则会随着时间而改变,因此如果您使用Edge浏览器,请尝试保持最新以了解当前限制,并意识到您正在AppContainer中运行.

For purposes of development you may find tools like ngrok or loopback helpful. I am sure app isolation rules change over time so try to stay up to date with the current limits and realize you are running in an AppContainer if you are using the Edge browser.

这篇关于Microsoft Edge:XMLHttpRequest:网络错误0x2efd,由于错误00002efd而无法完成操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆