473,769 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2968
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*******@plea se.com> wrote in message
news:dJ******** ************@co mcast.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*******@plea se.com> wrote in message
news:dJ******** ************@co mcast.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
6544
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 of the next page asp, set the session ID from the value retrieved from the URL? How do you manually set the session ID?
0
1155
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 than using the default implementation of cookieless sessions /(sessionID)/ which appears if you set cookieLess="TRUE" in the web.config file. I can't find any information on how this is being done. Any clues? -David
0
1651
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 websites (e.g. match.com) are using ASP.NET and are implementing cookieless sessions in this manner, yet everything I read says that the only method of implementing cookieless sessions is by setting cookieless="true" and letting ASP.net "do it's...
2
1556
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 authentication doesn't work I read that the Whidbey release will support this and you can make it work today: http://www.codeproject.com/aspnet/cookieless.asp Still, it's a showstopper for most websites
10
7931
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 the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page requests and sessions.
0
1342
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 stored in a mySQL database, and state is maintained through the URL, passing a session GUID in the URL between page calls. For example: http://localhost/index.html?-session=42FFA3821db04174BBRxjX1B4B48
2
1944
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 case: If "cookieless" is set to false then ... - If user's browser supports cookies then cookie is used to track Session
2
1704
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 takes input from a remote site), to not have cookieless sessions as it can't redirect the call from /_test/scriptname.aspx to /{sessionID}/_test/scriptname.aspx. I am able to do this using the web.config location element, however I get the error...
0
1380
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 application? We are attempting to set an Outlook folder to display a web page (ala Microsoft CRM 3's Outlook integration), but Outlook's implementation of the IE browser control appears to force a new session whenever you open a new browser window...
8
1841
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? Thanks Maboo
0
10038
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9857
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.