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?

 

相关文章:

  • 2021-08-30
  • 2022-01-04
  • 2021-08-27
  • 2021-09-07
  • 2021-09-15
  • 2021-09-13
  • 2022-01-03
  • 2021-10-07
猜你喜欢
  • 2021-11-18
  • 2021-10-28
  • 2021-05-03
  • 2021-08-07
  • 2019-01-09
  • 2021-10-13
  • 2021-10-23
相关资源
相似解决方案