• <tfoot id='8KFPM'></tfoot>
      • <bdo id='8KFPM'></bdo><ul id='8KFPM'></ul>

      1. <small id='8KFPM'></small><noframes id='8KFPM'>

        <i id='8KFPM'><tr id='8KFPM'><dt id='8KFPM'><q id='8KFPM'><span id='8KFPM'><b id='8KFPM'><form id='8KFPM'><ins id='8KFPM'></ins><ul id='8KFPM'></ul><sub id='8KFPM'></sub></form><legend id='8KFPM'></legend><bdo id='8KFPM'><pre id='8KFPM'><center id='8KFPM'></center></pre></bdo></b><th id='8KFPM'></th></span></q></dt></tr></i><div id='8KFPM'><tfoot id='8KFPM'></tfoot><dl id='8KFPM'><fieldset id='8KFPM'></fieldset></dl></div>

        <legend id='8KFPM'><style id='8KFPM'><dir id='8KFPM'><q id='8KFPM'></q></dir></style></legend>

        XMLHttpRequest:网络错误 0x80070005,在 Microsoft Edge(但

        时间:2023-09-03
        <tfoot id='30Ted'></tfoot>
          <tbody id='30Ted'></tbody>

            <small id='30Ted'></small><noframes id='30Ted'>

              <bdo id='30Ted'></bdo><ul id='30Ted'></ul>

                <legend id='30Ted'><style id='30Ted'><dir id='30Ted'><q id='30Ted'></q></dir></style></legend>

                <i id='30Ted'><tr id='30Ted'><dt id='30Ted'><q id='30Ted'><span id='30Ted'><b id='30Ted'><form id='30Ted'><ins id='30Ted'></ins><ul id='30Ted'></ul><sub id='30Ted'></sub></form><legend id='30Ted'></legend><bdo id='30Ted'><pre id='30Ted'><center id='30Ted'></center></pre></bdo></b><th id='30Ted'></th></span></q></dt></tr></i><div id='30Ted'><tfoot id='30Ted'></tfoot><dl id='30Ted'><fieldset id='30Ted'></fieldset></dl></div>
                • 本文介绍了XMLHttpRequest:网络错误 0x80070005,在 Microsoft Edge(但不是 IE)上拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个非常简单的 ajax 请求(见下文).服务器正在使用 CORS,并且在 IE 10+、Chrome、Firefox 和 Opera 中运行良好.但是,在 Microsoft Edge 上,它会失败并显示

                  I have a very simple ajax request (see below). The server is using CORS and works fine in IE 10+, Chrome, Firefox and Opera. On Microsoft Edge however, it fails with

                  XMLHttpRequest:网络错误 0x80070005,访问被拒绝.

                  XMLHttpRequest: Network Error 0x80070005, Access is denied.

                  我研究了这里,这里,这里和这里,但找不到答案作品.那些人在使用 IE 时遇到了问题,但是添加 contentType(此获取不需要)和 crossDomain 可以正常工作.

                  I have researched the posts here, here, here and here, but cannot find an answer that works. Those people have had issues with IE, but adding the contentType (not required for this get) and crossDomain has it working fine.

                  CanIUse 似乎表明 CORS 在 Edge 中可用.该请求在 IE9 关闭时也会失败,但 CanIUse 仅声明对 CORS 的部分支持,所以这是可以理解的.

                  CanIUse seems to state that CORS is usable in Edge. The request also fails on IE9 down, but CanIUse states only partial support for CORS, so that's understandable.

                  请问有什么办法可以解决这个问题吗?

                  Any ideas how I can fix this please?

                  代码:

                  $.ajax({
                        crossDomain: true,
                        url: "http://localhost:2023/api/DoAction/test",
                        success: function (a) {
                          var res = JSON.parse(a);
                          alert(res.content);
                        },
                        error: function (a, e, r) {
                          alert(a.responseText);
                        }
                      });
                  

                  更新

                  添加更多信息以防提供任何线索 - ajax 请求来自 Azure 并发布到使用 OWIN 自托管创建的 localhost 网站.这是不寻常的,但软件(只能在本地使用)从云服务获取数据是必需的.如前所述,它适用于所有其他浏览器,Edge 是唯一的问题.

                  To add further information in case it provides any clues - the ajax request is coming from Azure and posting to a localhost website created using OWIN self hosting. This is unusual, but required for the software (which can only be used locally) to get data from a cloud service. As stated, it works fine for all other browsers, Edge is the only problem.

                  推荐答案

                  对于使用 Microsoft Edge 的开发人员来说,这个问题应该不再存在.如果您在 localhost 测试中遇到问题,请导航到 about:flags,并确保选中 Allow localhost loopback.

                  This problem should no longer exist for developers using Microsoft Edge. If you experience issues with localhost testing, navigate to about:flags, and make sure Allow localhost loopback is checked.

                  Microsoft Edge当前不支持(开箱即用)本地主机测试.但是,您可以按照此处提供的指南启用它:http://dev.modern.ie/platform/faq/how-can-i-debug-localhost/.

                  Microsoft Edge does not currently support (out of the box) localhost testing. You can however enable it by following the guidance provided here: http://dev.modern.ie/platform/faq/how-can-i-debug-localhost/.

                  我们正在努力在未来的版本中解决此问题.

                  We're working on resolving this in a future release.

                  这篇关于XMLHttpRequest:网络错误 0x80070005,在 Microsoft Edge(但不是 IE)上拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:无法使用 Fetch API 从 localhost 加载 Deezer API 资源 下一篇:NestJS 在生产中启用 cors

                  相关文章

                  最新文章

                • <i id='TsIgF'><tr id='TsIgF'><dt id='TsIgF'><q id='TsIgF'><span id='TsIgF'><b id='TsIgF'><form id='TsIgF'><ins id='TsIgF'></ins><ul id='TsIgF'></ul><sub id='TsIgF'></sub></form><legend id='TsIgF'></legend><bdo id='TsIgF'><pre id='TsIgF'><center id='TsIgF'></center></pre></bdo></b><th id='TsIgF'></th></span></q></dt></tr></i><div id='TsIgF'><tfoot id='TsIgF'></tfoot><dl id='TsIgF'><fieldset id='TsIgF'></fieldset></dl></div>

                    • <bdo id='TsIgF'></bdo><ul id='TsIgF'></ul>

                    <small id='TsIgF'></small><noframes id='TsIgF'>

                    <legend id='TsIgF'><style id='TsIgF'><dir id='TsIgF'><q id='TsIgF'></q></dir></style></legend>
                    1. <tfoot id='TsIgF'></tfoot>