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. python中的取整

    处理数据时,经常会遇到取整的问题,现总结如下 1,向下取整 int() >>>a = 3.1 >>>b = 3.7 >>>int(a) 3 > ...

  2. HDMI之HPD

    HDMI(19Pin)/DVI(16 pin)的功能是热插拔检测(Hot Plug Detect,HPD),这个信号将作为主机系统是否对HDMI/DVI是否发送TMDS信号的依据.HPD是从显示器输出 ...

  3. 源项目 -> fork -> 本地 (如何把源项目的代码合并到本地然后推送给fork)

    git remote -v git remote add 别名 地址 git fetch 别名 git merge  别名/分支 第一步:命令行进入到本地.git 所在的目录,查看remote 信息 ...

  4. XML xmlns

    xmlns xml namespaces 参考 http://www.w3school.com.cn/tags/tag_prop_xmlns.asp http://www.w3school.com.c ...

  5. protobuf和protostuff的区别

    在我们的开发过程中,序列化是经常需要处理的问题,比如在做分布式访问数据时,或者是在做redis缓存存储数据时,如果我们涉及的知识面不够广的话,可能会简单的使用JDK的序列化,也即在需要序列化的类上im ...

  6. Android中去掉标题栏

    在Android中去掉标题栏有三种方法,它们也有各自的特点. 1.在代码里实现 this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏 记 ...

  7. Oracle EBS主界面的Top Ten List

    http://blog.csdn.net/pan_tian/article/details/7749128 Top Ten List的数据保存在表FND_USER_DESKTOP_OBJECTS中,登 ...

  8. PostgresSQL使用Copy命令能大大提高数据导入速度

    最近在做会员系统,其中会员系统有一份企业信息初始化的数据,需要从SQL Server数据库导入到PostgreSQL,单表的数据近30万.最开始的方案是在SQL Server上生成insert int ...

  9. JS学习笔记3_函数表达式

    1.函数表达式与函数声明的区别 函数声明有“提升”(hoisting)的特性,而函数表达式没有.也就是说,函数声明会在加载代码时被预先加载到context中,而函数表达式只有在执行表达式语句时才会被加 ...

  10. 数据导出之winfrom导出word(二)

    本篇文章介绍了根据word模板导出word文档的方法. 一.获取模板地址 WordDocFileHelper WordTem = new WordDocFileHelper(); string pat ...