Reputation: 195
I've deployed an azure web app. It used to set a cookie ai_session in a javascript. Now I've removed the script so it doesn't set on client side.
But in fiddler I see response headers have set-cookie for ai_session. I'm sure there's no server side code setting this cookie, and locally it doesn't repro. Now I might have had a server side code that sets this cookie at some point - I don't remember - but I redeployed many times after that with no server side code setting the cookies. And if I did it would be an http module.
Here's my request headers, no cookies:
GET / HTTP/1.1
Host: jssdkonmacos2.azurewebsites.net
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,ru;q=0.6
And the response headers:
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 1571
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/8.0
Set-Cookie: ai_session=d7020bd5e115451181378e0e9cb25b16|2015-06-11T22:41:33.1330732+00:00|2015-06-11T22:41:33.1643194+00:00; expires=Thu, 11-Jun-2015 23:11:33 GMT; path=/
Set-Cookie: ai_user=c3fa1b963c734b42a7d22f5734a250bf|2015-06-11T22:41:33.1174534+00:00; expires=Fri, 31-Dec-9999 23:59:59 GMT; path=/
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Set-Cookie: ARRAffinity=abc26e3fc461f385c6f17e5ca32edf2284e02c4c257972813a5bc741a7682e55;Path=/;Domain=jssdkonmacos2.azurewebsites.net
Date: Thu, 11 Jun 2015 22:41:32 GMT
The azure portal gives me the app/server logs - this is the entry after I remove all browser cookies and reload the page (it does have ai_session cookie):
2015-06-11 22:55:27 JSSDKONMACOS2 GET /Content/css v=MDbdFKJHBa_ctS5x4He1bMV0_RjRq8jpcIAvPpKiN6U1&X-ARR-LOG-ID=eeb5acd8-956f-4d60-b285-88d8a46a5708 80 - 167.220.0.169 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/43.0.2357.124+Safari/537.36 ai_session=96b824dd3ee1483699ca0d8fe3ce9fc7|2015-06-11T22:55:27.9458868+00:00|2015-06-11T22:55:27.9458868+00:00;+ai_user=b7396b81095d4920b64494ff3d9f93d0|2015-06-11T22:55:27.9458868+00:00;+ARRAffinity=abc26e3fc461f385c6f17e5ca32edf2284e02c4c257972813a5bc741a7682e55 http://jssdkonmacos2.azurewebsites.net/ jssdkonmacos2.azurewebsites.net 200 0 0 23193 1204 15
I've deployed the latest version of same app to a new azure web app and there's no cookies, as expected.
So can the cookies be cached by azure? Or other proxies on a way to my app? Or can http module be "cached" (web.config not replaced by redeployments)?
Upvotes: 0
Views: 3436
Reputation: 106
I don't know if this answer your question but, Azure Web App has sticky session on by default. This is mananged by a cookie and the value ARRAffinity. You can turn this feature of in web.config.
Upvotes: 1