where are session variables stored on client

D

DC Gringo

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 cookie, I don't see
anything. Am I looking in the right place? Here are my session state
settings, they are default:


<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a
particular session.
If cookies are not available, a session can be tracked by adding a session
identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->


<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>
 
E

Eliyahu Goldin

Session variables are stored on the server. What is stored in a cookie is
the session id. It is used to restore the session variables on the server
when client's postback arrives.

Eliyahu
 
G

Greg Burns

I believe the only thing stored on the client will be your session ID in a
cookie. The actual data is on the server. The server links the data to the
client via that id.

If you set cookieless="true" in web.config, your session ID will be embedded
in the URL.

Not sure, but wouldn't the session cookie be stored C:\Documents and
Settings\<user>\Cookies?

Greg
 
S

Scott Allen

Not sure, but wouldn't the session cookie be stored C:\Documents and Settings\<user>\Cookies?

I believe you'll only find persistent cookies on the hard drive. 'session'
cookies are only kept around in memory (and I'm using session in a generic
sense).
 
W

WJ

DC Gringo said:
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>
Change the "Inproc" to "SQLServer" and click here to install SQL/State
Server http://support.microsoft.com/kb/311209

The above link shows you how to install Persitence State for Asp.Net
application. Once done, logon to your web site, do a few things. Then
finally, use SQL/Analyzer to view your Asp.Net states (the database name is
"ASPSTATE", I believe or you want to view the install script to be sure what
it is called).

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top