473,396 Members | 1,853 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,396 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 2930
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: JJ | last post by:
Hi, I really need to use cookieless ASP sessions with ASP 3 (IIS5) Can I find out the session ID from the first page, then post it or send it with the url to the next page, then at the start...
0
by: djluker | last post by:
I've seen a few sites around (for example, Match.com and some areas of microsoft.com) that implement a cookieless session by tacking on the session ID (usually in Hex) to a page's querystring, rather...
0
by: djluker | last post by:
Does anyone know of a way to implement cookieless sessions in ASP.net by tacking on the session ID to the querystring, rather than setting cookieless="true" in the web.config file? I see that some...
2
by: Tom Pester | last post by:
I experimented/researched cookieless sessions and tried it on my website. I expected the switch to cookieless sessions to be transparent but this isn' t the case at all: 1) Forms based...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
0
by: Jerad Rose | last post by:
I have an odd scenario. I am working on a hybrid site that uses various development platforms, namely traditional ASP and Lasso (a Mac scripting language). The site uses its own custom sessions...
2
by: Daniel Malcolm | last post by:
Hi I just wanted to confirm that the "cookieless" attribute of the session section of the web.config file is an "all or nothing" setting. For some reason I thought that the following was the...
2
by: Jac Timms | last post by:
Hi, I am building a mobile site. It has to have cookieless sessions enabled as asp.net mobile stores viewstate information for controls in session. I need one directory in the application (that...
0
by: David H. | last post by:
Is there any way to have a user use cookieless sessions at runtime on a case-by-case basis? Or do cookieless sessions have to be turned on globally in the web.config for all users of the web...
8
by: maboo59 | last post by:
when using ASP.NET 2.0, if you set 'cookieless session = fales' (meaning you want to use cookies), is the session information stored in a cookie on the client machine or in the browsers memory? ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.