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

Cookies delimiter in ASP.NET

Hi all,

I was developing an web application where the data in the client are stored
in cookies using the Response.Cookies collection. However, I have found out
that for some clients, their browser stored the cookies as name values pairs
with "." (Comma) instead of ";" (semi-colon) as delimiters! And this has
created a problem for the Request.Cookies collection because (I believe) the
microsoft cookies object has ";" as default delimiter. Does anyone how to
chage that? Thanks a lot.

Calvin
Nov 18 '05 #1
3 1972
The W3C specifications state that cookies are set using and http header like
so:
Set-Cookie: name1=value1; name2=value2; name3=value3

ASP.NET does it this way too. How do you see a comma instead of a semicolon?

Here is a sample http header

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Sun, 18 Jan 2004 07:34:39 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Set-Cookie: firstName=Shiv; path=/
Set-Cookie: lastName=Kumar; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 782

--
Shiv R. Kumar
http://www.matlus.com
Nov 18 '05 #2
The application I am developing is in fact WAP. It seems that some phone
models used "," instead of ";" as cookies delimiter in the phone wap
browser. Please help.

Calvin
"Shiv Kumar" <sh***@erolsnoooospaaaam.com> wrote in message
news:eL**************@TK2MSFTNGP10.phx.gbl...
The W3C specifications state that cookies are set using and http header like so:
Set-Cookie: name1=value1; name2=value2; name3=value3

ASP.NET does it this way too. How do you see a comma instead of a semicolon?
Here is a sample http header

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Sun, 18 Jan 2004 07:34:39 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Set-Cookie: firstName=Shiv; path=/
Set-Cookie: lastName=Kumar; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 782

--
Shiv R. Kumar
http://www.matlus.com

Nov 18 '05 #3
Well then they are not adhering to the specifications :)
I don't know if ASP.NET has a "parameter" for this. The only way I know you
could do this is by adding the Set-Cookie header yourself.
--
Shiv R. Kumar
http://www.matlus.com
Nov 18 '05 #4

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

Similar topics

5
by: j-marvin | last post by:
The example uses the mysql client delimiter command to change the statement delimiter from ; to // while the procedure is being defined. This allows the ; delimiter used in the procedure body to be...
3
by: Laurent | last post by:
Hello, is it possible to read a file in python line by line by redefining a new end-of-line delimiter ? I would like for example to have the string "END" being the new delimiter for each...
4
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any...
2
by: Siemel Naran | last post by:
Hi. In order to define a procedure I tried changing the delimiter to the pipe symbol | so that the semicolon ; is not interpreted as end of command. This idea is in the documentation file...
7
by: Generic Usenet Account | last post by:
I am trying to set up a delimiter character string for the input stream such that the delimiter string is "skipped over" in the input stream. Can someone suggest how to do this with some sample...
4
by: Raquel | last post by:
Could someone explain to me what the reason is for having a character delimiter (which is double quotes by default) for performing Loads/Imports on UDB? I would think that column delimiter along...
3
by: magix | last post by:
Dear Guru, I have been thinking hard on how to token based on demiliter after certain position. Example, I have list of possible string below, and the the delimiter is "1" with the rules below...
4
by: kretik | last post by:
I've been trying to coax this class to use something other than the default '$' but it seems setting it to something else has no discernible effect. Is it necessary to inherit from the class to do...
11
by: Sven Reuter | last post by:
Hallo NG, ich versuche gerade ein PHP-Script zu bauen, das einen Trigger in einer MySQL-Datenbank erstellt. Doch leider funktioniert das nicht und ich habe auch über google keine Hinweise...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
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,...

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.