using jquery + jsonp, Internet explorer isn't saving the ASP.NET sessionID

左心房为你撑大大i 提交于 2019-12-07 19:49:38

问题


So I am doing some fairly simple JSONP stuff using Jquery.

General structure

  • Site lives on domain A
  • Javascript lives on domain B
  • JSON services also live on domain B

The site calls a method which jsonp calls out to a json service (.net) , in .net i set the session and return.

This all works fine, except in IE it is not storing or passing the session id in subsequent requests.. So .net creates a new one every time.

If i go to the JSON url directly, ie happily stores it, and will use it on subsequent calls.

Firefox and chrome don't have any problem with this, but for some reason IE seems to be ignoring the session cookie through jquery, but the response works fine besides that.


回答1:


A lot of browsers are more restrictive with their same origin policy than firefox. It is not an IE issue. The XHR / MSXML object is not accepting the cookie.

http://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy



来源:https://stackoverflow.com/questions/779455/using-jquery-jsonp-internet-explorer-isnt-saving-the-asp-net-sessionid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!