Session always 0 when cookie disable

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 "".
huangxbAsked:
Who is Participating?
 
jonaleeConnect With a Mentor Commented:
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
 
huangxbAuthor Commented:
    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
 
jonaleeCommented:
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
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
huangxbAuthor Commented:
    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
 
jonaleeCommented:
Yes, disable cookie, you will not be able to use session
0
 
huangxbAuthor Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.