?
Solved

ASP: Session Variables & Cookies

Posted on 1998-05-11
1
Medium Priority
?
221 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 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