Wednesday, 15 April 2015

asp.net - Browser ignores cookie if domain is set -



asp.net - Browser ignores cookie if domain is set -

i need share cookie between 2 web applications deployed on azure (eg. x1.azurewebsites.net, x2.azurewebsites.net)

i thought need set domain:

response.cookies.add(new httpcookie("test", "ble") { domain = "azurewebsites.net" });

but not working.

for test purposes added:

response.cookies.add(new httpcookie("test2", "aqq"));

and 1 works ok - available on x1.azurewebsites.net

so question whats wrong code above?

is possible share cookie this?

maybe security issue? - understand every application hosted on azuerwebsites have access info stored in cookie

i found question similar

chrome34 ignores cookies domain ".cloudapp.net"

so cause of issue browser checks publicsuffix.org list domains , block cookies security reasons.

for more info please see: http://publicsuffix.org/

asp.net cookies

No comments:

Post a Comment