Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Possible to turn on/off cookieless sessions dynamically on a case by case basis at run-time?

Reply
Thread Tools

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

 
 
Steve Franks
Guest
Posts: n/a
 
      06-02-2004
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


 
Reply With Quote
 
 
 
 
Steve Franks
Guest
Posts: n/a
 
      06-04-2004
Does anyone have an some idea on whether this can be done, and if so, how?
Microsoft gurus - what do you think?


"Steve Franks" <> wrote in message
news:...
> 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
>
>



 
Reply With Quote
 
 
 
 
Steve Franks
Guest
Posts: n/a
 
      06-10-2004
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" <> wrote in message
news:...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
splitting an XML file on the basis on basis of XML tags bijeshn@gmail.com Python 14 04-08-2008 04:26 AM
Cookieless Sessions (Sessions Without Cookies) and Security scottymo ASP .Net Security 3 09-29-2006 11:00 PM
sessionState cookieless and forms cookieless ravisingh11@gmail.com ASP .Net 2 05-09-2006 11:26 PM
Dynamically using .resx resources on a per-theme basis markarichman@gmail.com ASP .Net 0 03-02-2006 01:04 AM
Cookieless Sessions... JV ASP .Net 1 08-04-2003 02:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57