Mening ovqatim nima? Cookie asmx chaqiruviga o'tkazilmaydi

Bu yerda (brauzer) cookie-fayllari mavjud.

Sharepoint sahifam bor (http://myServer: 24628/saytlar/myApp/myDocumentLibrary/test.aspx). Sahifa so'ralganda, so'rovlar sarlavhalarida (firebug'dan foydalanib) ASP.NET_SessionId cookie-faylini ko'rishim mumkin.

Sarlavha talab qiling:

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

Javob sarlavhalari:

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

Sahifa yuklagandan so'ng, bir asmx so'rovini (Post) qilaman:

Sarlavha talab qiling:

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 chaqiruvini amalga oshirishdan avval, "ASP.NET_SessionId" cookie-faylining qiymatini ogohlantiraman. Bu erda va uning qiymati to'g'ri.

Notify.asmx chaqiruvida ba'zi bir mantiqni ishlatish uchun cookie qiymatini olishim kerak. Bu, albatta, bajarilmaydi Bu erda nima sodir bo'ladi?

Ha,

Manu.

4
@ jadarnel27 - Ha! Men ham shunday qilmoqchi edim! Men oldin javob berish uchun kaltaklanganman, lekin hayvonlarning pishiriqlari haqida emas!
qo'shib qo'ydi muallif Curt, manba
Undan yuklangan JavaScript qaerda bo'ladi? "Myerver: 24628" yoki boshqa bir domendan keladimi? jQuery ajax sessiya cookie-faylini yubormaslik haqida ma'lumot olish uchun qarang:
qo'shib qo'ydi muallif NotMe, manba
qo'shib qo'ydi muallif jadarnel27, manba
Katta aqllar! @ TweeZz Xush kelibsiz =)
qo'shib qo'ydi muallif jadarnel27, manba
@ jadarnel27 6 soatdan keyin xira bo'lganimdan keyin yuzimga tabassum qila olasiz .. thx
qo'shib qo'ydi muallif TweeZz, manba

3 javoblar

Sizning cookie faylingiz yuborilmaydi, chunki Xost maydoni ikki so'rovda bir xil emas:

Xost: webapp01: 24628

     

Xostimni hostim: 24628

2
qo'shib qo'ydi
Buning sababi shundaki, "webapp01" ni o'zgartirishni unutib qo'ydik
qo'shib qo'ydi muallif TweeZz, manba

JavaScript-da, aslida, boshqa joydan yuklangan. Chris Lively mening savolimga sharhni taklif qildi.

1
qo'shib qo'ydi

Barcha bazalarni qamrab olgan holda [WebMethod (EnableSession = true)] bormi?

Bu faqat IEda bo'ladimi? Buni faqat IE bilan ko'rganmisiz, P3P sarlavhasini kiritish kerak edi, ammo bu o'zaro faoliyat SSO yechimi uchun edi.

0
qo'shib qo'ydi
Nima uchun bu WebMethod atributi bilan biror narsa qilish kerak? Brauzer cookie-fayllarni tranzit qilmasa kerak.
qo'shib qo'ydi muallif TweeZz, manba
Javascript UZB
Javascript UZB
99 ishtirokchilar

@js_uzb @vuejs_uz @react_uz @nodejs_uz @angular_uz @ngTashkent @yiiframework_uz @laravel_uz @linux_uzbek @python_uz @swift_uzb —————— @uzdevgroup @UzGeeksGroup ——— @UzDev_Jobs @jobs_uzb