Jump to content

Set domain property in cookie


dev

Recommended Posts

Hi,I was trying to set cookie domain property to my domain name, say www.abc.comI am trying this because i want to access this cookie for my entire website usage. Cookie is created by one of my subdomain (say. test.abc.com) so theoritically the cookie name will be cookie:name@test.abc.com/ and hence this cookie will be accessible only the test.abc.com; so i tried to setup cookie domain property to cookie:name@www.abc.com/ so that other subdomains can also access it but its not working.This is the code i am using:---------Line1: Response.Cookies("TP")=variablesLine2: Response.Cookies("TP").Domain = "www.abc.com"Line3: Response.Cookies("TP").Expires=now()+1---------Without Line2 the cookie works just fine with default domain name. can anyone know whats wrong and how the problem can be solved?with thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...