473,326 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Strange cookie behavior

AHN
Please tell me somebody what causes the cookie set with
<%
Response.Cookies("blah") = "Blah blah"
Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() )
%>
work as supposed on my local server but fail on my site on Brinkster. On the
next page it disappears if used with "Expires" attribute set, and is there,
if without. It was working some time ago. I was forced to reinstall my OS
(W2k, IIS 5.0) since then and already a few days I have this problem.

Here is what iis help says:
"Expires Write-only. The date on which the cookie expires. This date must be
set in order for the cookie to be stored on the client's disk after the
session ends. If this attribute is not set to a date beyond the current
date, the cookie will expire when the session ends.
"
It does not say I can't set the cookie for one hour. What's wrong?
Thanks for any help.

Jul 19 '05 #1
5 3471
Maybe the remote server is in a different time zone.

Ray at work

--
Will trade ASP help for SQL Server help
"AHN" <an****@excite.com> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookies("blah") = "Blah blah"
Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() )
%>
work as supposed on my local server but fail on my site on Brinkster. On the next page it disappears if used with "Expires" attribute set, and is there, if without. It was working some time ago. I was forced to reinstall my OS
(W2k, IIS 5.0) since then and already a few days I have this problem.

Here is what iis help says:
"Expires Write-only. The date on which the cookie expires. This date must be set in order for the cookie to be stored on the client's disk after the
session ends. If this attribute is not set to a date beyond the current
date, the cookie will expire when the session ends.
"
It does not say I can't set the cookie for one hour. What's wrong?
Thanks for any help.


Jul 19 '05 #2
AHN
No it is not. I had that thought but checked it already a few days ago.
Anything else?

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eB**************@tk2msftngp13.phx.gbl...
Maybe the remote server is in a different time zone.

Ray at work

--
Will trade ASP help for SQL Server help
"AHN" <an****@excite.com> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookies("blah") = "Blah blah"
Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() )
%>
work as supposed on my local server but fail on my site on Brinkster. On the
next page it disappears if used with "Expires" attribute set, and is

there,
if without. It was working some time ago. I was forced to reinstall my OS (W2k, IIS 5.0) since then and already a few days I have this problem.

Here is what iis help says:
"Expires Write-only. The date on which the cookie expires. This date

must be
set in order for the cookie to be stored on the client's disk after the
session ends. If this attribute is not set to a date beyond the current
date, the cookie will expire when the session ends.
"
It does not say I can't set the cookie for one hour. What's wrong?
Thanks for any help.



Jul 19 '05 #3
The Expires property on the Response object is a date - not a time...hence
it expires today.

from
http://msdn.microsoft.com/library/de...asp?frame=true

Write-only. The date on which the Cookie expires. This date must be set
in order for the Cookie to be stored on the client's disk after the session
ends. If this attribute is not set to a date beyond the current date, the
Cookie expires
when the session ends.

Brian Staff

"AHN" <an****@excite.com> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookies("blah") = "Blah blah"
Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() )
%>
work as supposed on my local server but fail on my site on Brinkster. On the next page it disappears if used with "Expires" attribute set, and is there, if without. It was working some time ago. I was forced to reinstall my OS
(W2k, IIS 5.0) since then and already a few days I have this problem.

Here is what iis help says:
"Expires Write-only. The date on which the cookie expires. This date must be set in order for the cookie to be stored on the client's disk after the
session ends. If this attribute is not set to a date beyond the current
date, the cookie will expire when the session ends.
"
It does not say I can't set the cookie for one hour. What's wrong?
Thanks for any help.


Jul 19 '05 #4
AHN
Thanks. I feel so stupid.

"Brian Staff" <brianstaff@[NoSpam]compuserve.com> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
The Expires property on the Response object is a date - not a time...hence
it expires today.

from
http://msdn.microsoft.com/library/de...us/iisref/htm/
ref_vbom_resoccook.asp?frame=true
Write-only. The date on which the Cookie expires. This date must be set in order for the Cookie to be stored on the client's disk after the session ends. If this attribute is not set to a date beyond the current date, the
Cookie expires
when the session ends.

Brian Staff

"AHN" <an****@excite.com> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookies("blah") = "Blah blah"
Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() )
%>
work as supposed on my local server but fail on my site on Brinkster. On the
next page it disappears if used with "Expires" attribute set, and is

there,
if without. It was working some time ago. I was forced to reinstall my OS (W2k, IIS 5.0) since then and already a few days I have this problem.

Here is what iis help says:
"Expires Write-only. The date on which the cookie expires. This date

must be
set in order for the cookie to be stored on the client's disk after the
session ends. If this attribute is not set to a date beyond the current
date, the cookie will expire when the session ends.
"
It does not say I can't set the cookie for one hour. What's wrong?
Thanks for any help.



Jul 19 '05 #5
AHN
Don't think you're right. Just read;
``If this attribute is not set to a date beyond the current date, the Cookie
expires when the session ends."
I could expect that it will be written, and thrown out with the end of the
session. Besides, its not logical, and also it WORKS on my local server as
its supposed to. The different timezone idea takes more water, but
<%Response.Write Now()%> returns the correct time from the big server out
there.
Thanks anyway. I found another way. I set the cookie and then keep track of
the time in some other file, which refreshes itself every 15 secs. As soon
as the hour is over, I kill the cookie with my bare hands. :)
Cheers

"Brian Staff" <brianstaff@[NoSpam]compuserve.com> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
The Expires property on the Response object is a date - not a time...hence
it expires today.

from
http://msdn.microsoft.com/library/de...us/iisref/htm/
ref_vbom_resoccook.asp?frame=true
Write-only. The date on which the Cookie expires. This date must be set in order for the Cookie to be stored on the client's disk after the session ends. If this attribute is not set to a date beyond the current date, the
Cookie expires
when the session ends.

Brian Staff

"AHN" <an****@excite.com> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookies("blah") = "Blah blah"
Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() )
%>
work as supposed on my local server but fail on my site on Brinkster. On the
next page it disappears if used with "Expires" attribute set, and is

there,
if without. It was working some time ago. I was forced to reinstall my OS (W2k, IIS 5.0) since then and already a few days I have this problem.

Here is what iis help says:
"Expires Write-only. The date on which the cookie expires. This date mus

t be
set in order for the cookie to be stored on the client's disk after the
session ends. If this attribute is not set to a date beyond the current
date, the cookie will expire when the session ends.
"
It does not say I can't set the cookie for one hour. What's wrong?
Thanks for any help.



Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tony Archer | last post by:
(Forgive the dupicate post, I had left out the OS Version out of the prior post.) Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a...
2
by: swp | last post by:
I have a site created using ASP, HTML, and JavaScript. I use frames to manage a few things, and requires SSL to connect. The site is on a secured network, not meant to be cross-browser...
4
by: Shannon Jacobs | last post by:
I'm doing some trivial surveys, and I want to know if the same user answers twice. Can't really know that, but at least I thought I could check for the same browser/computer combination by using a...
1
by: JJ_377 | last post by:
What is the reason for the difference between the way Netscape 7.1 (NS) makes a cookie and Internet Explorer 6 (IE) makes one in the following case: The following JavaScript cookie assignment...
1
by: adlaird | last post by:
Hi, I created a simple webform, put a test button on it and implemented a click handler that looks like so: private void btnTest_Click(object sender, System.EventArgs e) {...
3
by: Ben | last post by:
I'm having problems with cookies from asp.net to asp back to asp.net. It seems like I can set a cookie in asp.net fine, and alter it at will, as soon as asp touches it, asp.net won't have...
3
by: rss | last post by:
SUMMARY: ========== I am unable to pass along a simple Cookie obtained from a HttpWebRequest call (Machine A's ASP.NET app) so that another Web Server (Machine B) recongnizes the cookie. I...
3
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm...
0
by: gfergo | last post by:
We have a pretty straightforward page ('Page 1'). The codebehind creates a DataTable and binds the data to a Repeater which renders an HTML table on screen. The first column in the HTML table is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.