Recenently, I encountered a problem.

Client side code is:

$http({
url: "/api/runtimelicense"
, method: "GET"
})
.success(function (data) {
window.location('#/search');
})
.error(function () {
});

Server side code is:

DbContext_context = GetContext(); // Just get dbcontexnt.

_context.MyDBSet.Where(s => s.ID == myID).ToList(); // When this request is from IE,it always throw exception with message "The connection was not closed. The connection's current state is open."; but if this request is from Chrome, all are ok.

At beginning, I felt very strange, as I know, browser should not impact server side by the same http request. I open Fiddler to see, there is an AngularJs digest error in IE, this error causes another request, it means there are two same http request to submit. I googled this question, but got nothing. I just repalce "window.location('#/search');" with "$location.path('/search');" , this issue is solved. Now, I still cannot know the details clearly. So, remain 2 questions:

1) Why does IE Angular digest exception?

2) Why does exception can cause another request?

One difference between AngularJS' $location and window.location的更多相关文章

  1. window.location.href = window.location.href 跳转无反应 a 超链接 onclick 点击跳转无反应

    错误写法 , 主要是在 href="#"这里 <a href="#" id="send" onclick="return b ...

  2. window.location.href = window.location.href window.location.reload()

    w 0-会议预订提交了预订日期,预订成功后默认显示仅显示当前日期的新页面若显示预定日的信息,则可以对预定日存入cookie: http://stackoverflow.com/questions/24 ...

  3. window.location和window.location.href和document.location的关系

    1,首先来区分window.location和window.location.href. window.location.href是一个字符串. 而window.location是一个对象,包含属性有 ...

  4. JS中 window.location 与window.location.href的区别

    疑惑:window.location='url'  与window.lcoation.href='url'效果一样,都会跳转到新页面,区别在哪?查得的资料如下: 1:window.location是页 ...

  5. js 刷新页面window.location.reload();

    Javascript刷新页面的几种方法:1    history.go(0)2    window.location.reload() window.location.reload(true) 3   ...

  6. window.top.location.href 和 window.location.href 的区别

    "window.location.href"."location.href"是本页面跳转. "parent.location.href" 是 ...

  7. window.location事件

    一.最外层top跳转页面,适合用于iframe框架集 top.window.location.href("${pageContext.request.contextPath}/Login_g ...

  8. 解决微信浏览器无法使用window.location.reload()刷新页面

    解决方法: 使用    window.location.href=window.location.href+随机数    代替 window.location.reload(). function r ...

  9. javascript宿主对象之window.location

    location属性是一个用来存储当前页面URL信息的对象. 下面我们通过循环来列出location对象的完整属性列表: for(var i in location){ if(typeof locat ...

随机推荐

  1. 证明2x2正交矩阵专置后还是正交矩阵

    [ x1  x2 y1   y2] x1^2+y1^2=1 x2^2 + y2^2=1 x1*x2  + y1*y2=0 如果专置后还是 x1^2 + x2^2=1 y1^2  +y2^2=1 x1* ...

  2. TCP/IP协议(1):各层协议帧格式

    一. 1.OSI与TCP/IP对应: TCP/IP各层功能: 链路层:包括操作系统的设备驱动程序和计算机的网卡,提供底层传输服务.   网络层:为数据选择路由,在众多计算机和网络设备组成的网络中选择一 ...

  3. Effective C++ 随笔(4)

    条款21:必须返回对象时,别妄想返回其reference 例子: Raional类可以执行有理数的一些运算,并且使用heap内存申请 并且其operator*函数为 const Rational&am ...

  4. hibernate之helloword(环境搭建)

    环境搭建 hibernate.cfg.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ...

  5. POJ1065--Wooden Sticks(动态规划)

    There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The st ...

  6. 第78讲:Type与Class实战详解

    今天来学习下type与class解析 让我们先来看看代码 import scala.reflect.runtime.universe._ class Sparktrait Hadoopobject F ...

  7. bzoj网络流

    近期看了一些bzoj的网络流,深感智商不够.不过对于网络流又有了进一步的理解. 还是mark一下吧. 献上几篇论文:1)<最小割模型在信息学竞赛中的应用> 2)<浅析一类最小割问题& ...

  8. Swift3 页面顶部实现拉伸效果代码

    //懒加载 //顶部需要拉伸自定义视图 lazy var headView:MyHeaderView = { //let hframe = CGRect(x: 0, y: 0, width: swid ...

  9. Kali Linux渗透测试实战 2.2 操作系统指纹识别

    目录 2.2 操作系统指纹识别 2.2.1 Banner抓取 2.2.2 TCP 和 ICMP 常规指纹识别技术 TCP数据报格式 ICMP首部格式 TTL与TCP窗口大小 FIN探测 BOGUS f ...

  10. Azure DevOps Server(TFS 2019) 中的SonarQube扫描任务出现错误:AppTest.java can't be indexed twice

    SonarQube错误描述 将一个Maven示例程序导入到Azure DevOps的待库中,执行SonarQube扫描过程时, DevOps Server提示下面的错误信息: [ERROR] Fail ...