Solved

ASP: Session Variables & Cookies

Posted on 1998-05-11
1
195 Views
Last Modified: 2013-12-25
With Microsoft ASP, it is easy to create user-specific variables through the use of session variables. However, it would seem that the way IIS associates page requests with a particular browser is through the use of a cookie (ASPSESSIONID, I think it's called). This is fine and easy, but can session variables be used when a browser is set to refuse cookies? I don't see how this can be true. If so, what's the best way of detecting this condition and doing something about it? I've read the Microsoft Press book on ASP, but it skims over this area completely.
0
Comment
Question by:pob
1 Comment
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1855951
If the user refuses the ASP-cookie, Session variables will not work.
You can ask for the cookie by Request.Servervariables("HTTP_COOKIE ")

There is not much you can do about it. You'll just have to think of doing it without sessionvariables, or warn the user that without accepting cookie, he won't get the full advantage of the site.

One way i can think of that is similar to Sessionvariables, is to       check in each page the users IP-number, put it in a storage (database), and add fields with the values of the sessionvariables you would have used. Of course this will cost a lot of performance. And you'll have to find a way to empty the database.




0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now