Hi,

So I have been having memory problems on my Classic ASP / Access website that have caused the server to crash and forced me to reduce session timeouts and add some regular app pool recycling (which destroys the user's session).

The login and the cart (as well as other things) have been stored in session variables. So when the server recycles the app pool or the session times out, the user's cart is destroyed.

I changed the (UltraDev-based) cart I am using so that it stores the cart in a cookie explicitly using Javascript run at server:

Code:
function GetCookieName(){
	var server = "speakingtree";
	return  server + this.Name;
}

function SetCookie(){
	var cookieName = this.GetCookieName()
	var cookieStr = this.GetContentsSerial(this.cookieColDel, this.cookieRowDel)
	var cookieExp = GetCookieExp(this.cookieLifetime)
	Response.Cookies(cookieName) = cookieStr
	Response.Cookies(cookieName).expires = cookieExp
}
This works beautifully on my test server, where the cookies are stored on the localhost "client" browser (Firefox). However when I put this code on the live site and tested using the same client browser (and a different browser and computer) everything appears to work as normal with the cart working from a cookie. However, when the session times out the cart is destroyed. This is kind of a disaster as sessions are terminating regularly on my site at the moment as I work through some serious memory issues.

The cookie can be read whilst the session is active using VBScript:

Code:
Response.Write "UCCart1.GetCookieName() = "&UCCart1.GetCookieName() & "<br />"
Response.Write "Request.Cookie = "&Request.Cookies(UCCart1.GetCookieName()) & "<br />"
Response.Write "UCCart1.cookieLifetime = "&UCCart1.cookieLifetime & "<br />"
Response.Write "Request.Cookie.expires = "&GetCookieExp(1) & "<br />"
which shows something like:

UCCart1.GetCookieName() = speakingtreeUCCart
Request.Cookie = 40439#UC_C#1#UC_C#Lover`s Guide To Palmistry#UC_C#3.99#UC_C#3.99
UCCart1.cookieLifetime = 1
Request.Cookie.expires = 02/09/2010 00:37:06

However if I look for this cookie in Firefox I can't find a cookie called "speakingtreeUCCart". In contrast, when the site is being tested on localhost I CAN find this cookie in my browser: "speakingtreeUCCart".


Can anyone suggest what I can do to solve this problem? Why would the cookie work in my browser from my localhost but not the remote web server? Is this possibly an IIS setting? Is it possible the cookies are being stored on the server?

Any help or suggestions much appreciated as this really urgently needing solving.

Cheers,
Tom