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

<sessionState cookieless="true" />

What do you mean by a cookieless session state? When you set the
sessionState section's cookieless attribute to true in the web.config
file, what does that mean?

I read this
(http://msdn.microsoft.com/library/de...ateSection.asp)
and it does not explain the meaning of cookieless.

Nov 19 '05 #1
13 3515
It means that ASP.NET doesn't use cookies to maintain session state.

Instead, ASP.NET will maintain session state by inserting a random ID,
like : http://yourserver.com/(S(n1rpjs55dou...elloworld.aspx
in your URL.

Then, *that* ID identifies the state of your client's session,
instead of cookies being used to maintain session state.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
What do you mean by a cookieless session state? When you set the
sessionState section's cookieless attribute to true in the web.config
file, what does that mean?

I read this
(http://msdn.microsoft.com/library/de...ateSection.asp)
and it does not explain the meaning of cookieless.

Nov 19 '05 #2
aha! thanks! so, then it doesn't have anything to do with the fact that
I want to drop cookies on the client for other stuff such as UserID on
my own? I mean, other than the fact that the client browser user
cookies or not, it doesn't have anything to do with placing a
restriction on the developer to use cookies himself for storing
information on the client?

Nov 19 '05 #3
Also, is there a way we could check if a client has cookies
enabled/turned on or not?

Nov 19 '05 #4
Water Cooler v2,

"cookieless" means just that : no cookies at all!

With cookieless="true", you can still use a different method
to assign a way to follow a client's session, like a UserID,
as you mention, but you don't get to use cookies at all.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11********************@o13g2000cwo.googlegrou ps.com...
aha! thanks! so, then it doesn't have anything to do with the fact that
I want to drop cookies on the client for other stuff such as UserID on
my own? I mean, other than the fact that the client browser user
cookies or not, it doesn't have anything to do with placing a
restriction on the developer to use cookies himself for storing
information on the client?

Nov 19 '05 #5
If you set cookieless = "false", what you
can do is issue a cookie, and try to retrieve it.

If you can retrieve it, the client has cookies enabled;
if you can't retrieve it, the client doesn't have cookies enabled.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Also, is there a way we could check if a client has cookies
enabled/turned on or not?

Nov 19 '05 #6
I am still confused. My question is,

With cookieless, are we telling the server

(1) Hey, look! I might use cookies if I like and if the client has them
enabled, but you, you don't get to use cookies to persist session
information;

or, are we telling the server

(2) The client is a moron. He's got his cookies turned off. Neither do
you, nor do I get any cookies. So, don't drop a cookie for persisting
session info, and I won't drop any cookies, too, because the "client
won't let me". Instead of baking session id into a cookie, just pass it
along the URL and I'll understand?

Nov 19 '05 #7
re:
I am still confused. My question is,
With cookieless, are we telling the server

(1) Hey, look! I might use cookies if I like and if the client has them
enabled, but you, you don't get to use cookies to persist session
information;
With "cookieless" your server doesn't get to use cookies at all,
as the name of the setting implies.

re: (2) The client is a moron. He's got his cookies turned off.
Setting cookieless ="true" means that you don't get to *send*
a cookie, regardless of whether the client has them enabled or not.

"cookieless" is a server setting, not a client setting.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Water Cooler v2" <wt*****@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...I am still confused. My question is,

With cookieless, are we telling the server

(1) Hey, look! I might use cookies if I like and if the client has them
enabled, but you, you don't get to use cookies to persist session
information;

or, are we telling the server

(2) The client is a moron. He's got his cookies turned off. Neither do
you, nor do I get any cookies. So, don't drop a cookie for persisting
session info, and I won't drop any cookies, too, because the "client
won't let me". Instead of baking session id into a cookie, just pass it
along the URL and I'll understand?

Nov 19 '05 #8
>Setting cookieless ="true" means that you don't get to *send*
a cookie, regardless of whether the client has them enabled or not.

That line explains it. Or, may be I just got my eureka from the
emphasis on *send*, as you typed it. So, it is the second case I
thought? The client is a moron one.

Thanks!

Nov 19 '05 #9
Oooops! Please ignore the previous message. I've been awake too long.
What I meant was that I got the eureka with the *send* in your message
and the eureka I got was that it was the first option I was thinking
of: "we tell the server that you don't get to use/send a cookie to the
client to persist session info. We don't know whether the client has
turned cookies on or off."

Nov 19 '05 #10
Request.Browser.Cookies will tell you if client has cookies enabled.

The cookieless setting simply determines how the asp.net application
saves the session ID
to overcome the statelessness of http. If it is set to "true", the
session ID is saved as cookie.
If set to "false", it will use URL rewriting to save the sessID. Also,
you can still issue other cookies
to the client as Juan has pointed out (such as a user name or zip).
However, before saving state
in a cookie you should definitely check if the browser has cookies
enabled (see above), or choose
another state storage mechanism.

Nov 19 '05 #11
Thanks, Juan for the answer and Stefan for amplifying it.

Nov 19 '05 #12
Unless I'm mistaken, Request.Browser.Cookies will tell you
if the browser is *capable* of accepting cookies, and not
whether the cookies are *enabled*.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Stefan" <Cl*********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Request.Browser.Cookies will tell you if client has cookies enabled.

The cookieless setting simply determines how the asp.net application
saves the session ID
to overcome the statelessness of http. If it is set to "true", the
session ID is saved as cookie.
If set to "false", it will use URL rewriting to save the sessID. Also,
you can still issue other cookies
to the client as Juan has pointed out (such as a user name or zip).
However, before saving state
in a cookie you should definitely check if the browser has cookies
enabled (see above), or choose
another state storage mechanism.

Nov 19 '05 #13
Juan, you are right, my bad.

There is not really an easy way out. You could check if the ".ASPXAUTH"
cookie exists to check if cookies are enabled. This presupposes though
that
- your app has set cookieless to "false"
- the client has not cookies disabled altogehter
- hasn't disabled cookies after the aspxauth cookie was set

The only safe way to check seems to do some probing by sending a cookie
in the http response (maybe along with a meta refresh to make it more
seamless) and then check in the next request if the cookie comes back.

Sorry for the misinformation
-Stefan

Nov 19 '05 #14

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

Similar topics

3
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function...
2
by: Water Cooler v2 | last post by:
What do you mean by a cookieless session state? When you set the sessionState section's cookieless attribute to true in the web.config file, what does that mean? I read this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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:
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.