views:

60

answers:

2

If i use Response.Cookies["test"].Value ="Hi"; where are cookie stored in system?

Can i check Cookies["test"] value in my pc because cookies are stored in text format.

I am using VS 2008. Operating system is Windows 7.

I have tried to find in Google but not getting the exact answer. Please help to sort out this problem.

A: 

Your cookies are stored in your user folder:

%userprofile%\AppData\Roaming\Microsoft\Windows\Cookies

You will need to "show" hidden / system files to see them.

Sohnee
Hey Thanks but I did not find Cookies folder inside Windows folder.
PrateekSaluja
Okay, you could do a search for folders named "Cookies", it should be in that kind of area. What browser are you using?
Sohnee
`AppData\Roaming` doesn't exist under Windows XP and earlier
abatishchev
I have tried to find cookies but not getting any thing.Mozila 3.6.10
PrateekSaluja
I am using windows 7 live..I got the path %userprofile%\AppData\Roaming\Microsoft\Windows\
PrateekSaluja
@abatishchev - the question is explicitly about Windows 7.
Sohnee
Anyway hard-coding OS-specific directory name is a bad idea, right?
abatishchev
@abatishchev - the question seems to be in relation to debugging, i.e. checking the cookie that has been programatically created - not about manually getting cookies from the specified directory.
Sohnee
+2  A: 

IE and Windows keeps cookies here:

%AppData%\Microsoft\Windows\Cookies

Points to the same directory as @Sohnee's does under Windows Visa and newer, but his doesn't under Windows XP and earlier, my - does.

also Temporary Internet Files can contain some cookies.

Meanwhile Firefox keeps cookies into SQLite database under profile root:

%AppData%\Mozilla\Firefox\Profiles\%FirefoxProfile%\cookies.sqlite

To read the data you need to connect to that database using any SQLite client and execute next query:

select value
from moz_cookies
where name = 'test'

I did it just now using trial SQLite Maestro. And don't forget to close all running Firefoxes before connection attempt.

abatishchev
@abatishchev:thanks I got a file.but how can i see Cookies["test"] value.
PrateekSaluja
@Prateek: See my updated post
abatishchev
@abatishchev:can you please explain how to use this tool?
PrateekSaluja