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

where are cookies stored ?

Hi,

In Windows Vista: where does asp.net write its cookies?

I use
HttpCookie objCookie = new HttpCookie("nameCookie");

in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies

there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?

thank you
Chris
Aug 24 '08 #1
7 10186
Usually in C:\Users\Username\AppData\Roaming\Microsoft\Window s\Cookiesortype
Start and type shell:cookies, press enter and it will opne the folder for
you.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
<cm****@gmail.comwrote in message
news:be**********************************@x41g2000 hsb.googlegroups.com...
Hi,

In Windows Vista: where does asp.net write its cookies?

I use
HttpCookie objCookie = new HttpCookie("nameCookie");

in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies

there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?

thank you
Chris

Aug 24 '08 #2
Cookies in Vista are stored at:

Drive:\Users\(User Name)\AppData\Roaming\Microsoft\Windows\Cookies\Lo w
AND
Drive:\Users\(User Name)\AppData\Roaming\Microsoft\Windows\Cookies

http://www.vistax64.com/tutorials/60641-cookies.html

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================

<cm****@gmail.comwrote in message news:be**********************************@x41g2000 hsb.googlegroups.com...
Hi,

In Windows Vista: where does asp.net write its cookies?

I use
HttpCookie objCookie = new HttpCookie("nameCookie");

in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies

there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?

thank you
Chris


Aug 24 '08 #3
....AND in the Temporary Internet Files folder which you can't see without turning off UAC

You will have to also uncheck the *Hide protected operating system files*
option in Folder Options to see those files

CCleaner has a great cookie manager (Options, Cookies) feature in it,
and can delete (Cleaner option) all of the cookies to.

You might want to give it a try.

CCleaner : http://www.ccleaner.com/


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================

"Juan T. Llibre" <no***********@nowhere.comwrote in message news:ez**************@TK2MSFTNGP04.phx.gbl...
Cookies in Vista are stored at:

Drive:\Users\(User Name)\AppData\Roaming\Microsoft\Windows\Cookies\Lo w
AND
Drive:\Users\(User Name)\AppData\Roaming\Microsoft\Windows\Cookies

http://www.vistax64.com/tutorials/60641-cookies.html

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================

<cm****@gmail.comwrote in message news:be**********************************@x41g2000 hsb.googlegroups.com...
>Hi,

In Windows Vista: where does asp.net write its cookies?

I use
HttpCookie objCookie = new HttpCookie("nameCookie");

in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies

there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?

thank you
Chris



Aug 24 '08 #4
cm****@gmail.com wrote:
Hi,

In Windows Vista: where does asp.net write its cookies?

I use
HttpCookie objCookie = new HttpCookie("nameCookie");

in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies

there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?

thank you
Chris
Nowhere.

A session cookie is only stored in memory. You have to set the
expiration date of the cookie to make it persistent, then it will be
stored as a file.

--
Göran Andersson
_____
http://www.guffa.com
Aug 24 '08 #5
On Aug 25, 1:16 am, Göran Andersson <gu...@guffa.comwrote:
cmr...@gmail.com wrote:
Hi,
In Windows Vista: where does asp.net write its cookies?
I use
HttpCookie objCookie = new HttpCookie("nameCookie");
in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore
I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies
there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?
thank you
Chris

Nowhere.

A session cookie is only stored in memory. You have to set the
expiration date of the cookie to make it persistent, then it will be
stored as a file.

--
Göran Andersson
_____http://www.guffa.com
hello,

thank you all for your suggestions but I still have my problem !!

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies\Low
and in Temporary Internet Files folder,

deleted everything in the folders, reload my file in the browser but
it still uses information stored in a cookie

maybe you can give it a try, it is a small html application (listing
available at the end of this message)

I have a main file : "counter.html" that shows a collection of CDs
In that file, a counter is holding track of the amount of times the
user has visited the page (basically the counter increases after every
refresh in the browser)
once a maximum is reached the user is redirected to the other file
"signup.html"

so, what I try to do is 'reset' the application by deleting the cookie
physically or by resetting the counter inside the cookie just by
editing it
but for that I need to know where the cookie is located
The purpose of my app is to show students how fragile cookies are and
to be able to show them WHERE cookies are located !

thank you for giving it a try
**************************************************
the content of signup.html
**************************************************
<html>
<head>
<title></title>
</head>

<body>
<h1>
You reached the maximum amount of visits to this site.
<br />
You need to sign up if you want to use it again....</h1>
</body>
</html>

**************************************************
the content of counter.html:
**************************************************
<html>
<head>
<title>Using cookies to create a personal Web page hit counter </
title>

<script type="text/javascript" language="javascript">

function getCookie(name)
{
for (var i=0; i < bytes.length; i++)
{
nextbite = bytes[i].split("="); // break into name and value

if (nextbite[0] == name) // if name matches
return unescape(nextbite[1]); // return value
}
return null;
} // getCookie()

function setCookie(name, value)
{
if (value != null && value != "")
document.cookie= name + "=" + escape(value)
+ "; expires="
+ expiry.toGMTString();
bytes = document.cookie.split("; "); // update cookie bytes
} // setCookie()

var bytes = document.cookie.split("; ");
var today = new Date();
var expiry = new Date(today.getTime()+28*24*60*60*1000);

var headCount = getCookie("headCount");
var userName = getCookie("userName");
if (headCount == null)
headCount = 1;
if (userName == null)
{
userName = prompt("Please Enter Your Name:", "Anonymous");
if (userName == null || userName == "")
userName="Anonymous";
}
if (headCount == 1) // welcome for first visit
{
alert("Welcome, " + userName + ", this is your first visit");
}
else if (headCount <= 10)
{
alert("Welcome back " + userName + "\r\nYou have been here "
+ headCount + " time(s).");
}
else
window.location = "signup.html";

headCount++;

setCookie("headCount", headCount);
setCookie("userName", userName);

</script>

</head>
<body>
<h1>
Welcome</h1>
<h2>
CD Collection</h2>
<table border="1" id="Table1">
<tr bgcolor="#9acd32">
<th align="left">
Title
</th>
<th align="left">
Artist
</th>
</tr>
<tr>
<td>
CD Title1
</td>
<td>
Artist1
</td>
</tr>
<tr>
<td>
CD Title2
</td>
<td>
Artist2
</td>
</tr>
<tr>
<td>
CD Title3
</td>
<td>
Artist3
</td>
</tr>
</table>
</body>
</html>
Aug 25 '08 #6
On Aug 25, 1:16 am, Göran Andersson <gu...@guffa.comwrote:
cmr...@gmail.com wrote:
Hi,
In Windows Vista: where does asp.net write its cookies?
I use
HttpCookie objCookie = new HttpCookie("nameCookie");
in Win2000 (and later) they used to be in
C:\Documents and Settings\Administrator\Cookies
but not anymore
I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies
there are some cookies but the cookie I use in my webapp must be
stored somewhere else since
when I delete all cookies in this directory, my webapp still
recognises my cookie to be alive ... but where is it?
thank you
Chris

Nowhere.

A session cookie is only stored in memory. You have to set the
expiration date of the cookie to make it persistent, then it will be
stored as a file.

--
Göran Andersson
_____http://www.guffa.com
hello,

thank you all for your suggestions but I still have my problem !!

I looked in
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies
C:\Users\MyUserNameAppData\Roaming\Microsoft\Windo ws\Cookies\Low
and in Temporary Internet Files folder,

deleted everything in the folders, reload my file in the browser but
it still uses information stored in a cookie

maybe you can give it a try, it is a small html application (listing
available at the end of this message)

I have a main file : "counter.html" that shows a collection of CDs
In that file, a counter is holding track of the amount of times the
user has visited the page (basically the counter increases after every
refresh in the browser)
once a maximum is reached the user is redirected to the other file
"signup.html"

so, what I try to do is 'reset' the application by deleting the cookie
physically or by resetting the counter inside the cookie just by
editing it
but for that I need to know where the cookie is located
The purpose of my app is to show students how fragile cookies are and
to be able to show them WHERE cookies are located !

thank you for giving it a try

**************************************************
the content of signup.html
**************************************************
<html>
<head>
<title></title>
</head>

<body>
<h1>
You reached the maximum amount of visits to this site.
<br />
You need to sign up if you want to use it again....</h1>
</body>
</html>

**************************************************
the content of counter.html:
**************************************************
<html>
<head>
<title>Using cookies to create a personal Web page hit counter </
title>

<script type="text/javascript" language="javascript">

function getCookie(name)
{
for (var i=0; i < bytes.length; i++)
{
nextbite =
bytes[i].split("="); // break into name and value

if (nextbite[0] ==
name) // if name matches
return
unescape(nextbite[1]); // return value
}
return null;
} // getCookie()

function setCookie(name, value)
{
if (value != null && value != "")
document.cookie= name + "=" +
escape(value)

+ "; expires="

+ expiry.toGMTString();
bytes = document.cookie.split(";
"); // update cookie bytes
} // setCookie()

var bytes = document.cookie.split("; ");
var today = new Date();
var expiry = new Date(today.getTime()
+28*24*60*60*1000);

var headCount = getCookie("headCount");
var userName = getCookie("userName");
if (headCount == null)
headCount = 1;
if (userName == null)
{
userName = prompt("Please Enter Your Name:",
"Anonymous");
if (userName == null || userName == "")
userName="Anonymous";
}
if (headCount == 1) // welcome for first visit
{
alert("Welcome, " + userName + ", this is your
first visit");
}
else if (headCount <= 10)
{
alert("Welcome back " + userName + "\r\nYou
have been here "
+
headCount + " time(s).");
}
else
window.location = "signup.html";

headCount++;

setCookie("headCount", headCount);
setCookie("userName", userName);

</script>

</head>
<body>
<h1>
Welcome</h1>
<h2>
CD Collection</h2>
<table border="1" id="Table1">
<tr bgcolor="#9acd32">
<th align="left">
Title
</th>
<th align="left">
Artist
</th>
</tr>
<tr>
<td>
CD Title1
</td>
<td>
Artist1
</td>
</tr>
<tr>
<td>
CD Title2
</td>
<td>
Artist2
</td>
</tr>
<tr>
<td>
CD Title3
</td>
<td>
Artist3
</td>
</tr>
</table>
</body>
</html>
Aug 25 '08 #7
<snip />

Go to http://www.nirsoft.net/ and download the free utility IECookiesView it
is very very useful

Aug 25 '08 #8

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

Similar topics

2
by: mark4asp | last post by:
Hello, I'm running my script locally and the cookie has been saved on the machine because the login page is by-passed (with the Redirect to "menu.asp" below. OK - but where is my cookie...
1
by: kublai khan | last post by:
I set temporary cookies that I can easily view with Mozilla. With IE (6), however, I cannot find them in the Temporary Internet Files folder with the page still open. It looks like the cookies are...
8
by: CDARS | last post by:
Hi all, I have a confusing question on ASP.NET cookies usage: 1> Response.Cookies("test").value = Now 2> Response.Write(Request.Cookies("test").value) 3> 4> Response.write("<hr>") 5>...
7
by: DC Gringo | last post by:
I was under the impression that when I create session variables such as session("myVar1"), they get stored on the client in a cookie. When I look in my Temporary Internet Files directory for the...
3
by: Raghu Raman | last post by:
Hi, I want to store a cookie peemanently for 2 days.From msdn article, i have coded like this.It is working when i run my application .But if i close my browser and restart my application , i...
0
by: dawson | last post by:
I started off by trying to use the HttpCapabilitiesBase.Cookies Property (Note: This property is new in the .NET Framework version 2.0) however it kept on returning true even when I disabled...
3
by: mosesdinakaran | last post by:
Hi Where does the cookies stored in the client machine that php creates after calling session_start() function. I am using IE... I checked in the following folders but no cookies are stored....
3
by: damezumari | last post by:
To find out were session variables are stored I included this instruction in my program: echo ini_get("session.save_path"); The reply was /home/7604/data/tmp which is a folder on my server. I...
2
by: Damodhar | last post by:
HI friends, # any one say where the cookie files are stored and whats the path and whats the extension for the cookie files in php,this is client side variable.can u say the path for cookie ...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.