As Evertjan pointed out, there is no reason to expect that your code
would work.
Your line
Session ("nc") = 1
does not send a cookie to the client, it just assigns a value to a
session variable. This action does not depend on cookies, so testing
whether this action was successful will always return true.
Think of it this way
Client send request to server (including any valid cookies it may have
for the server)
Server processes the request and send back a response (which may
include one or more new cookies in the header)
repeat etc etc
So, the only reliable way to check if the client has (session) cookies
enabled is to set a session variable in page1.asp and read it in
page2.asp
That's just how cookies work - not a MS problem or peculiarity.
Tim
"George Hester" <he********@hot mail.com> wrote in message
news:e7******** ******@TK2MSFTN GP09.phx.gbl...
Hi Evertjan:
Yes that may be what's going on here. I don't know but I do know
that I have been testing cookies enabled this way for two years. Also
when I mentioned to Microsoft my problem they seemed to understand
what I was saying. And suggested I go to SP4 to fix the issue. I
believe the reason why that hotfix is no longer available is becasue
regression testing probably told them it wasn't a good idea. Just
speculating here of course. I don't know it's back to normal. So I
dealt with it as they say.
It seems to me if the client says No Any type of Cookies there should
be No Any type of Cookies. Where is Aristotle when you need him?
--
George Hester
_______________ _______________ ____
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ***********@194 .109.133.29...
George Hester wrote on 30 jan 2004 in
microsoft.publi c.inetserver.as p.general:
I had all my cookies OFF and Session("nc") = 1 was still
happening. That's wrong and shouldn't be.
I think the session is still valid ON THE SAME PAGE.
Only if you go to the next page, the session is not kept without the
session-id cookie and a new session is started.
So: =============== =============== ==
<%
session("blah") = "blop"
response.write session("blah")
' this will always write "blop"
%>
But: =============== ===============
f1.asp:
<%
session("blah") = "blop"
response.redire ct "f2.asp"
%>
f2.asp
<%
response.write session("blah")
' this will only write "blop",
' if the session persits,
' that is if session cookies are allowed
%>
=============== =============== =====
Not tested.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)