473,396 Members | 1,966 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,396 software developers and data experts.

Inconsistent cookie issue - IIS4

I'm having an inconsistent problem involving cookies. I have attempted to
duplicate the OS/browser settings for the remote users in question but I
cannot seem to duplicate the problem in any OS (Mac, Linux, Windows). I've
gone over and visited one problem site and I couldn't get it to work by
playing with security and privacy settings in MSIE. Obviously there is a
setting somewhere but I can't find it.

I can duplicate the problem by commenting out the ASP code that sets a
particular cookie. I also didn't see the cookie get set on the problem
system when I was trouble-shooting. I can't have the problem system with me
when I code though. :(

I won't post the entire project, but here are the parts that seem to be
central to the problem...

<%
Response.Expires=-1
Response.AddHeader "Pragma", "no-cache"

response.cookies("epeid") = value '40 characters
response.cookies("epeid").Expires = dateadd("n", 7, date() & " " &
Time())
response.redirect redirectURL
%>

It works fine on my systems. It redirects on the problem systems, only they
act like the cookie doesn't exist. When I asked the computer to prompt me
for each cookie I never saw epeid. On my system when I ask for a prompt it
just stalls on that particular cookie.

The above code is executed before any headers are written.

Thanks for any advice!

--
Mike
Jul 19 '05 #1
1 1579
"changed" <ch*****@changed.com> wrote in message
news:bj**********@geraldo.cc.utexas.edu...
It works fine on my systems. It redirects on the problem systems, only they act like the cookie doesn't exist. When I asked the computer to prompt me
for each cookie I never saw epeid. On my system when I ask for a prompt it just stalls on that particular cookie.


I found the problem. In this particular step I was writing a cookie with
ASP and then writing another cookie with JavaScript in the same page
request. Both cookies would be used immediately after the redirect. The
redirect would not work consistently with any machine although the chances
of success improved with newer/better machines. The ASP cookie didn't need
to be written in this step (I was doing it at every step, now it's done at
the first step) so I stopped writing it and everything works fine.

I think ASP cookies and JavaScript cookies don't get along if they are being
written in the same instance of a page request.

--
Mike
Jul 19 '05 #2

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

Similar topics

2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
2
by: Richard | last post by:
Having trouble getting Session to persist. Have checked properties of the Virtual Directory in IIS4 manager and "Enable Session State" is checked, with time out set to 20 Mins. Have also checked...
18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
6
by: Mark | last post by:
I am designing a game for a forum. When the user has finished playing I need to save their data to a cookie then navigate to a page which holds their score data (I can't have both sets of data on...
1
by: Derek Fountain | last post by:
I just figured out a rather puzzling problem I had with a cookie apparently being ignored. I had it set to timeout in 3 minutes and it worked fine tested on localhost, but sometimes failed when...
3
by: Ben | last post by:
Hi, I'm sending out a session cookie. That is a cookie that has no expiration date. When I surf through the site, no problems, but if I close the browser and open it back up, the cookie is still...
7
by: Doug | last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on "search.mydomain.com"; hence, a new session and cookie are being created on every sub-domain. This is occuring because...
15
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
1
by: flutetones | last post by:
http://67.189.52.24/~metafusionserver/public_html/training.php Here is a link to my server. I have an issue that doen't make sense. What's hapening is this . . . What's going right . . .
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.