472,143 Members | 1,143 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Possible to turn on/off cookieless sessions dynamically on a case by case basis at run-time?

According to the docs you tell ASP.NET to use cookieless sessions by setting
a value in the config.web file.

However, what if I wanted to determine at run time whether or not I wanted
to use cookieless sessions for a particular user, and if so, I'd instruct
ASP.NET to turn on cookieless sessions for a particular user session. Is
this possible?

For example I want to use cookie based sessions by default for all users.
But if a user has set a preference in my sites options to not use cookies on
my site, I want to dynamically at run time force ASP.NET to use cookieless
sessions for this one visitor in particular, while everyone else runs with
cookie based sessions by default.

Is there a property I can set/override at run time within the HttpContext or
something else (perhaps I can intercept the request via a HttpModule and set
a property to turn cookieless sessions on/off?) to tell ASP.NET to force
sessionless cookies on a case by case basis? Or is the only way to do this
through the config file, in which case it is either cookieless sessions for
everyone or cookieless sessions for no one (based on the boolean set in
config.web)?

If there is no way to override this setting dynamically at run time (so I
can use cookieless sessions for some visitors and not others) is there any
other fancy way I can effectively force ASP.NET to do this? Such as getting
fancy within an HttpModule to perform what ASP.NET would be doing, etc?

Any ideas would be really appreciated. Thanks to all in advance for your
thoughts on this.

Steve
Nov 18 '05 #1
2 2770
Does anyone have an some idea on whether this can be done, and if so, how?
Microsoft gurus - what do you think?
"Steve Franks" <no*******@please.com> wrote in message
news:dJ********************@comcast.com...
According to the docs you tell ASP.NET to use cookieless sessions by setting a value in the config.web file.

However, what if I wanted to determine at run time whether or not I wanted
to use cookieless sessions for a particular user, and if so, I'd instruct
ASP.NET to turn on cookieless sessions for a particular user session. Is
this possible?

For example I want to use cookie based sessions by default for all users.
But if a user has set a preference in my sites options to not use cookies on my site, I want to dynamically at run time force ASP.NET to use cookieless
sessions for this one visitor in particular, while everyone else runs with
cookie based sessions by default.

Is there a property I can set/override at run time within the HttpContext or something else (perhaps I can intercept the request via a HttpModule and set a property to turn cookieless sessions on/off?) to tell ASP.NET to force
sessionless cookies on a case by case basis? Or is the only way to do this through the config file, in which case it is either cookieless sessions for everyone or cookieless sessions for no one (based on the boolean set in
config.web)?

If there is no way to override this setting dynamically at run time (so I
can use cookieless sessions for some visitors and not others) is there any
other fancy way I can effectively force ASP.NET to do this? Such as getting fancy within an HttpModule to perform what ASP.NET would be doing, etc?

Any ideas would be really appreciated. Thanks to all in advance for your
thoughts on this.

Steve

Nov 18 '05 #2
Does anyone know if Microsoft engineers monitor / reply to the group? Since
it has been about a week with no responses I am assuming this is either a
complex topic or something that there is little or no information on. So
I'm hoping that maybe someone at Microsoft can shed some light or perhaps
point me in the right direction (or even tell me that this is not possible).
Anyone?

"Steve Franks" <no*******@please.com> wrote in message
news:dJ********************@comcast.com...
According to the docs you tell ASP.NET to use cookieless sessions by setting a value in the config.web file.

However, what if I wanted to determine at run time whether or not I wanted
to use cookieless sessions for a particular user, and if so, I'd instruct
ASP.NET to turn on cookieless sessions for a particular user session. Is
this possible?

For example I want to use cookie based sessions by default for all users.
But if a user has set a preference in my sites options to not use cookies on my site, I want to dynamically at run time force ASP.NET to use cookieless
sessions for this one visitor in particular, while everyone else runs with
cookie based sessions by default.

Is there a property I can set/override at run time within the HttpContext or something else (perhaps I can intercept the request via a HttpModule and set a property to turn cookieless sessions on/off?) to tell ASP.NET to force
sessionless cookies on a case by case basis? Or is the only way to do this through the config file, in which case it is either cookieless sessions for everyone or cookieless sessions for no one (based on the boolean set in
config.web)?

If there is no way to override this setting dynamically at run time (so I
can use cookieless sessions for some visitors and not others) is there any
other fancy way I can effectively force ASP.NET to do this? Such as getting fancy within an HttpModule to perform what ASP.NET would be doing, etc?

Any ideas would be really appreciated. Thanks to all in advance for your
thoughts on this.

Steve

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by djluker | last post: by
2 posts views Thread by Tom Pester | last post: by
reply views Thread by Jerad Rose | last post: by
2 posts views Thread by Daniel Malcolm | last post: by
2 posts views Thread by Jac Timms | last post: by
reply views Thread by David H. | last post: by
8 posts views Thread by maboo59 | last post: by

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.