Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookies and sessions ....

Status
Not open for further replies.

bobetko

Programmer
Jan 14, 2003
155
US
I am a little bit lost here.

If user turn off cookies, then session variables will be lost, and we want be able to pass them trough the pages, because server won't be able to recognize user? Is this right?

From this it follows that the Form Authentications won't work as well. For example User.Identity.Name is probably just some session variable.

Can somebody clerify this to me....

Is there work around?

greatful.......
 
I was under the impression that cookies and session variables are 2 very different things.

1. cookies reside on the users computer
2. session variables reside on the server for the lifetime of their session

So you should be able to keep session variables regardless of the users browser settings.
 
The user's session id is stored in a cookie, but cookieless sessions are possible. Data about the user can be kept in the viewstate, for instance. Here is an article about Cookieless Session, and google that term for further info.


----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Yes, but how is server supposed to know who you are and what session on the server is bound to your browser at home.
Session ID is stored in the form of cookie on your computer and it is used when you make next request to the server.

When cookies are off, sessions don't work. At least they don't in classic ASP. There are work arounds, for example you can send session ID through http request. (exp. In this case you have to attach this sessionID to every request you make.
...

Read this and you'll see the connection between cookies and seessions:
and this:
...
From Microsoft:
ASP maintains session state by providing the client with a unique key assigned to the user when the session begins. This key is stored in an HTTP cookie that the client sends to the server on each request. The server can then read the key from the cookie and re-inflate the server session state
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top