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

S

Steve Franks

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
 
S

Steve Franks

Does anyone have an some idea on whether this can be done, and if so, how?
Microsoft gurus - what do you think?
 
S

Steve Franks

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?
 

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,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top