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

Cookie naming conventions

Rob
Hi,

I'm using ASP to create a persistent cookie. The following
code is used...

CODE_STARTS
....
'and set up our cookie...
Response.Cookies("login_authorised")("username") = username
Response.Cookies("login_authorised")("firstname") = rs
("firstname")
Response.Cookies("login_authorised")("email") = rs("email")
Response.Cookies("login_authorised")("verify") =
checkstring

Response.Cookies("login_authorised").Expires = #01/01/2006#
....
CODE_ENDS

I have checked that the values are being passed in, and
that they are strings and when I run this code standalone
it works.

The problem seems to lie in IE creating two seperate
cookies. Under what circumstances would ASP force IE to
create a new cookie rather than using the existing one?

i.e. www.mydomain.com[1].txt is replaced with
www.mydomain.com[2].txt instead of being reused

Thanks in advance for any help you can give.
Jul 19 '05 #1
1 7468
rob
I've solved my own problem

....perhaps this will help someone else

I was changing a value of the cookie later on, and did not
realise that this would cause the cookie to be resent to
the browser ___without an expiry date___ , hence the
cookie was being created, but then it's expiry was being
removed, and so it only got written to the file system for
a brief moment.

thanks

rob.
-----Original Message-----
Hi,

I'm using ASP to create a persistent cookie. The followingcode is used...

CODE_STARTS
....
'and set up our cookie...
Response.Cookies("login_authorised")("username" ) = usernameResponse.Cookies("login_authorised")("firstname ") = rs
("firstname")
Response.Cookies("login_authorised")("email") = rs ("email")Response.Cookies("login_authorised")("verify") =
checkstring

Response.Cookies("login_authorised").Expires = #01/01/2006#....
CODE_ENDS

I have checked that the values are being passed in, and
that they are strings and when I run this code standalone
it works.

The problem seems to lie in IE creating two seperate
cookies. Under what circumstances would ASP force IE to
create a new cookie rather than using the existing one?

i.e. www.mydomain.com[1].txt is replaced with
www.mydomain.com[2].txt instead of being reused

Thanks in advance for any help you can give.
.

Jul 19 '05 #2

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

Similar topics

5
by: chris.lyon | last post by:
Is there any specific naming convention as to capitalisation? Cookies versus cgi for example.
4
by: Cristof Falk | last post by:
I wanted to get a feel. The documentation gives naming conventions for public/protected members. Is this truly widely adopted? And what about using the same conventions for private members and...
7
by: cmiddlebrook | last post by:
Hi there, I keep finding myself getting inconsistent with naming conventions for things like member variables, class names etc and I just want to find something that suits me and stick to it. I...
1
by: clintonG | last post by:
Does the use of DTD, XML Schema and similar constructs adopt the use of C# naming conventions? If so how do I make the distinction of how to apply C# conventions with XML elements, attributes and...
4
by: Mark Broadbent | last post by:
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per...
3
by: clintonG | last post by:
Does the use of DTD, XML Schema and similar constructs adopt the use of C# naming conventions? If so how do I make the distinction of how to apply C# conventions with XML elements, attributes and...
5
by: rastaman | last post by:
Hi all, I know of the existence of Object Naming Conventions for Visual Basic 6. Now I'm reading some books about VB .NET, but the names used for the objects are button1, picturebox1, etc. I...
4
by: Patrick | last post by:
what are the general naming conventions for vb.net controls. esp txtUserName, lblPassword, btnSubmit What are the prefixes for the controls???? I've tried to search hi and low on the net, but...
1
by: Philipp Post | last post by:
Marcello, Not a big surprise as naming conventions have a lot to do with personal prefernces. There are a lot of threads in comp.databases and the other database groups. Just do a search for...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.