473,714 Members | 3,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange cookie behavior

AHN
Please tell me somebody what causes the cookie set with
<%
Response.Cookie s("blah") = "Blah blah"
Response.Cookie s("blah").Expir es = 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 3489
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******** ******@TK2MSFTN GP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookie s("blah") = "Blah blah"
Response.Cookie s("blah").Expir es = 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******** ******@tk2msftn gp13.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******** ******@TK2MSFTN GP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookie s("blah") = "Blah blah"
Response.Cookie s("blah").Expir es = 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******** ******@TK2MSFTN GP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookie s("blah") = "Blah blah"
Response.Cookie s("blah").Expir es = 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******** ******@TK2MSFTN GP10.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_resocc ook.asp?frame=t rue
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******** ******@TK2MSFTN GP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookie s("blah") = "Blah blah"
Response.Cookie s("blah").Expir es = 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.Writ e 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******** ******@TK2MSFTN GP10.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_resocc ook.asp?frame=t rue
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******** ******@TK2MSFTN GP10.phx.gbl...
Please tell me somebody what causes the cookie set with
<%
Response.Cookie s("blah") = "Blah blah"
Response.Cookie s("blah").Expir es = 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
2228
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 production box. On the dev box everything works fine, in production it hoses: One of the things a user can do is click a "Change region" link which takes them to a map of the world. They can then select one of four regions.
2
1610
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 compatible, and only works with IE 5.5 or higher. IIS v5 is used, with all patches applied. "Keep Alives" are enabled. I have a login page that uses session variables to know things about who logged in, such as preferences and what rights they have. I...
4
5294
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 cookie. Here is the code I have now. In the header, I have the following: <SCRIPT language="JavaScript"> var cookieStatus; if (document.cookie.length > 0) { cookieStatus = 'Cookie exists with value ' + document.cookie; } else {
1
1428
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 statement (with variables name="CookieName" and strContent-"cookieValue"): document.cookie = name + "=" + strContent + ";" results in the following results in IE and NS:
1
2236
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) { HttpCookieCollection oCookReq = HttpContext.Current.Request.Cookies; HttpCookieCollection oCookResp =
3
2040
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 anything to do with it. Can someone please help! The code below, going from aspx to aspx, works great the cookie as expected goes from qwerty to zxcvb and back. As soon as you hit the asp page, the cookie goes to asdfg and stays there no matter how...
3
3596
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 have performed the exact steps by entering the URLs into the browser (IE). In this case, everything works. I have used TcpTrace to monitor the traffic, and have verified that the
3
2636
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 running into some PHP behavior that I do not understand in PHP 5.1.2. I need to parse the HTML from the following carefully constructed URI:
0
1194
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 a Checkbox. When one or more boxes is/are checked, and the submit button is clicked, the page posts back to itself, the selected value(s) is/are stored in a cookie, the user is then redirected to a second page ('Page 2').
0
9179
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5959
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4729
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3160
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2525
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.