什么是吃我的饼干?曲奇不ASMX通话送转 [英] What is eating my cookie?! Cookie does not get transferred in asmx call

查看:150
本文介绍了什么是吃我的饼干?曲奇不ASMX通话送转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里有一个(浏览器)的cookie问题。

I'm having a (browser) cookie issue here.

我有一个SharePoint页面(HTTP:// myServer上:24628 /网站/对myApp / myDocumentLibrary / Test.aspx文件)。当被请求的页面,我可以在请求头看到(使用Firebug),有一个ASP.NET_SessionId的cookie。

I have a Sharepoint page (http://myServer:24628/sites/myApp/myDocumentLibrary/test.aspx). When the page is requested, I can see in the request headers (using firebug) that there's a ASP.NET_SessionId cookie.

请求头:

Host: myServer:24628
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Cookie: ASP.NET_SessionId=2vhaxii0hxqeazii2sgw3q55; WSS_KeepSessionAuthenticated=24628
If-Modified-Since: Thu, 27 Oct 2011 15:41:15 GMT
Cache-Control: max-age=0

响应头:

Cache-Control: private, max-age=0
Content-Length: 210604
Content-Type: text/html; charset=utf-8
Expires: Wed, 12 Oct 2011 15:41:24 GMT
Last-Modified: Thu, 27 Oct 2011 15:41:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 12.0.0.6421
X-AspNet-Version: 2.0.50727
Set-Cookie: WSS_KeepSessionAuthenticated=24628; path=/
http%3A%2F%2FmyServer%3A24628%2Fsites%2FmyApp%2FDiscovery=WorkspaceSiteName=UG9ydGFs&WorkspaceSiteUrl=aHR0cDovL3dlYmFwcDAxOjI0NjI4L3NpdGVzL251bnRpbw==&WorkspaceSiteTime=MjAxMS0xMC0yN1QxNTo0MTozMQ==; expires=Sat, 26-Nov-2011 16:41:31 GMT; path=/_vti_bin/Discovery.asmx
Date: Thu, 27 Oct 2011 15:41:31 GMT

在页面加载后,我做出ASMX请求(POST):

After the page loads I make an asmx request (POST):

请求头:

Host    myServer:24628
User-Agent  Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Accept  text/javascript, text/html, application/xml, text/xml, */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection  keep-alive
X-Requested-With    XMLHttpRequest
X-Prototype-Version 1.7
Content-Type    application/json; charset=UTF-8
Referer http://myServer:24628/sites/myApp/myDocumentLibrary/test.aspx
Content-Length  42
Cookie  WSS_KeepSessionAuthenticated=24628

右键使得ASMX电话之前,我提醒ASP.NET_SessionIdcookie的值。它的存在,它的值是正确的。

Right before making the asmx call, I alert the value of the 'ASP.NET_SessionId' cookie. It's there and it's value is correct.

在notify.asmx呼叫我需要检索的cookie值才能够运行一些逻辑。这显然​​会失败。结果
这里发生了什么?

In the notify.asmx call I need to retrieve the cookie value to be able to run some logic. This obviously fails.
What is going on here?

嗷啊,

  • here's the url of the Notify service: http://myServer:24628/sites/myApp/_layouts/WebServices/NotifierServices.asmx/Notify (so the same domain, right?)
  • it's happening on IE / FF (didn't try other browsers)
  • on our production server it's working fine
  • the webservice has explicitly (intentionally) set EnableSession on false

马努。

推荐答案

JavaScript的确实是从其他位置加载。由于克里斯热闹建议,有关我的问题的注释。

The javascript was indeed loaded from a different location. As Chris Lively suggested in a comment on my question.

这篇关于什么是吃我的饼干?曲奇不ASMX通话送转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆