?
Solved

ASP: Session Variables & Cookies

Posted on 1998-05-11
1
Medium Priority
?
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
sybe earned 300 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

770 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