Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have solutions for globally removing the asp.net_sessionId - but I then want to add it programmably. Its nothing to do with tricking the user, but if my understanding of the new EU directive coming into action, I must give users an option to accept or reject ALL cookies..

Easy with Google Analytics - register the script IF the user says OK, or don't. And I know how to disable ASP.Net_sessionId globally, but if the user says OK, I'd like to turn it back on!

Ideas?
Posted

1 solution

You can enable or disable session at page level too. Using Page[^] property EnableSessionState.

Have a look at this article: How To Disable ASP Session State in ASP.NET[^]
 
Share this answer
 
Comments
AlexHarmes 10-May-12 11:39am    
Yes, thanks. This is the article to disable, however I need to know how to ENABLE if I have added the <sessionstate> to OFF in the web.config. Ideas?
Sandeep Mewara 10-May-12 12:15pm    
I doubt you will be able to do that at runtime. Will share across if I can think/find something.
AlexHarmes 10-May-12 12:21pm    
Many thanks - I've been working on this for days!
VJ Reddy 10-May-12 20:22pm    
Good answer. 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900