Cookie Behavior in Classic ASP-->ASP.NET

Cookie Behavior in Classic ASP-->ASP.NET

Cookie Interop - ASP -->ASPX:

There is a change in cookie behavior between ASP and ASPX. In brief: If you do NOT
specifically set a cookie path, ASP will automatically set the path to:
your web application's name --
"/AppName"
If you do NOT specifically set a path, ASPX will automatically set the path to:
your server name --
"/"

To make ASP behave like ASPX, then add --
Response.Cookies("...").Path = "/" -- to your ASP code

To make ASPX behave like ASP, then add --
MyCookieObject.Path = "/AppName" -- to your ASPX code.


Submission Date:  5/4/2004 9:59:40 PM
Submitted By:  Peter Bromberg
My Home Page:  http://www.eggheadcafe.com

By Peter Bromberg   Popularity  (644 Views)