?
Solved

Session always 0 when cookie disable

Posted on 1999-07-15
6
Medium Priority
?
267 Views
Last Modified: 2013-12-25
The web server is IIS4.0.
The browser is IE4.0 or Netscape4.0.
When the cookie option in Browser is disabled, the session variable in ASP can't be used, it means Session("anyone") is always 0 or "".
0
Comment
Question by:huangxb
[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
  • 3
  • 3
6 Comments
 
LVL 2

Accepted Solution

by:
jonalee earned 150 total points
ID: 1835081
It's really true. The session in IIS means when a user connect to the Web Server, it will create a Session object and store it in server memory. Every session has an ID. This ID needs to be transfered to client side as cookie. And when the client access the another page on IIS, it will send the session ID to server. Then the IIS server will recognize you from that ID.
In this case, you can store any value using Session.
Remember, IIS's session is something like cookie. It store all the data on server memory, but need session ID to identify different client.

That's why when you disable the cookie, then session will always be 0. This means, the server can not identify you (for you have no cookie which store the session ID)
0
 

Author Comment

by:huangxb
ID: 1835082
    Can I think that the Session can't be used when the cookie option is disabled? You know cookie need to be disabled somewhere, but the session is the very important base in the IIS4.0. So is it the very big bug in IIS4.0?  
0
 
LVL 2

Expert Comment

by:jonalee
ID: 1835083
Yes. If you disable cookie, then the session can not be used.
This is not bug. All Web Servers are the same.
But, if you really do not want to use cookie, you can pass the parameter through the url, like: asp?name=xxx&login=1
Like in MS Commerce Server, it pass userID through url, not in session.


0
Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

 

Author Comment

by:huangxb
ID: 1835084
    Can I think that the Session can't be used when the cookie option is disabled? You know cookie need to be disabled somewhere, but the session is the very important base in the IIS4.0. So is it the very big bug in IIS4.0?  
0
 
LVL 2

Expert Comment

by:jonalee
ID: 1835085
Yes, disable cookie, you will not be able to use session
0
 

Author Comment

by:huangxb
ID: 1835086
Thanks
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

719 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