Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > IE DOES NOT SUPPORT COOKIE on WIN2K and XP

Reply
Thread Tools

IE DOES NOT SUPPORT COOKIE on WIN2K and XP

 
 
krisrajz
Guest
Posts: n/a
 
      03-07-2005
Please observe the pages below:

session1.asp

<%
Session("test")="TESTING"
Response.Redirect "session2.asp"
%>

session2.asp

<%
Response.Write Session("test")
%>

Those pages does not output any thing if I use IE and If I access the pages
from machines running Windows 2000 Server, XP or Windows NT Server. Opera
outputs as per session variables name.

IIS server is running Windows 2000 server. I've checked the cookie settings
which was set to accept cookies.

I tried IE 5.0, IE 5.5 and IE 6.0

What could be the fix?
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-07-2005
krisrajz wrote:
> Please observe the pages below:
>
> session1.asp
>
> <%
> Session("test")="TESTING"
> Response.Redirect "session2.asp"
> %>
>
> session2.asp
>
> <%
> Response.Write Session("test")
> %>
>
> Those pages does not output any thing if I use IE and If I access the
> pages from machines running Windows 2000 Server, XP or Windows NT
> Server. Opera outputs as per session variables name.
>
> IIS server is running Windows 2000 server. I've checked the cookie
> settings which was set to accept cookies.
>
> I tried IE 5.0, IE 5.5 and IE 6.0
>


The only way a browser can affect the ability to use sessions is by
allowing/disallowing cookies.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      03-08-2005
Bob Barrows [MVP] wrote:
> The only way a browser can affect the ability to use sessions is by
> allowing/disallowing cookies.


Within the same window, perhaps that is true. But Internet Explorer goes the
extra mile with the ability to prevent separate windows (or frames) from
sharing cookies with each other. And in a manner that's uncontrollable, no
less. Bravo, Microsoft!


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


 
Reply With Quote
 
krisrajz
Guest
Posts: n/a
 
      03-08-2005
What's wrong with IE? or Do I need to disregard IE and to opt for other
browsers?

Is there any other programmable browsers available like IE?

RAJ.

"Dave Anderson" wrote:

> Bob Barrows [MVP] wrote:
> > The only way a browser can affect the ability to use sessions is by
> > allowing/disallowing cookies.

>
> Within the same window, perhaps that is true. But Internet Explorer goes the
> extra mile with the ability to prevent separate windows (or frames) from
> sharing cookies with each other. And in a manner that's uncontrollable, no
> less. Bravo, Microsoft!
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message. Use
> of this email address implies consent to these terms. Please do not contact
> me directly or ask me to contact you directly for assistance. If your
> question is worth asking, it's worth posting.
>
>
>

 
Reply With Quote
 
krisrajz
Guest
Posts: n/a
 
      03-08-2005
Please observe the code snippet

Shot #1

sample1.asp

<%
Session("test")="Session Testing"
Response.Cookies("cookietest")="Cookie Testing"
Response.write Session("test")
Response.Write Response.Cookies("cookietest")
%>

Does outputs Session Testing and Cookie Testing where as shot #2 does output
anything:

Shot #2

sample1.asp

<%
Session("test")="Session Testing"
Response.Cookies("cookietest")="Cookie Testing"
Response.Redirect "sample2.asp"
%>

sample2.asp

<%
Response.Write Session("test")
Response.Write Response.Cookies("cookietest")
%>

I've tested those pages on Avant Browser ( which is also IE based), it too
behaves as IE does. When I test pages on Opera, Netscape Navigator the pages
does output.

Why do IE behaves strangely on handling cookies and sessions? or Does IE
really has the ability to handle sessions efficiently?

Is there any patches available to fix the issue?

Any great workaround would be very much useful and appreciated.

TIA
RAJ.
"krisrajz" wrote:

> What's wrong with IE? or Do I need to disregard IE and to opt for other
> browsers?
>
> Is there any other programmable browsers available like IE?
>
> RAJ.
>
> "Dave Anderson" wrote:
>
> > Bob Barrows [MVP] wrote:
> > > The only way a browser can affect the ability to use sessions is by
> > > allowing/disallowing cookies.

> >
> > Within the same window, perhaps that is true. But Internet Explorer goes the
> > extra mile with the ability to prevent separate windows (or frames) from
> > sharing cookies with each other. And in a manner that's uncontrollable, no
> > less. Bravo, Microsoft!
> >
> >
> > --
> > Dave Anderson
> >
> > Unsolicited commercial email will be read at a cost of $500 per message. Use
> > of this email address implies consent to these terms. Please do not contact
> > me directly or ask me to contact you directly for assistance. If your
> > question is worth asking, it's worth posting.
> >
> >
> >

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-08-2005
krisrajz wrote:
> Please observe the code snippet
>
> Shot #1
>
> sample1.asp
>
> <%
> Session("test")="Session Testing"
> Response.Cookies("cookietest")="Cookie Testing"
> Response.write Session("test")
> Response.Write Response.Cookies("cookietest")
> %>
>
> Does outputs Session Testing and Cookie Testing where as shot #2 does
> output anything:
>
> Shot #2
>
> sample1.asp
>
> <%
> Session("test")="Session Testing"
> Response.Cookies("cookietest")="Cookie Testing"
> Response.Redirect "sample2.asp"
> %>
>
> sample2.asp
>
> <%
> Response.Write Session("test")
> Response.Write Response.Cookies("cookietest")
> %>
>
> I've tested those pages on Avant Browser ( which is also IE based),
> it too behaves as IE does. When I test pages on Opera, Netscape
> Navigator the pages does output.



I tested your code on my machine and discovered that the Redirect was the
problem. I changed the code to this:

<%
Session("test")="Session Testing"
Response.Cookies("cookietest")="Cookie Testing"
Response.Redirect "Sample2.asp?SessID=" & session.SessionID
%>

<%
Response.Write Session.SessionID & "<BR>"
Response.Write Session("test") & "<BR>"
Response.Write Request.Cookies("cookietest")
%>


And discovered that Redirect was causing a new session to be initiated. I
don't remember this behavior occurring so a recent service pack must be
responsible.

When I changed "Response.Redirect" to "Server.Transfer", the Session and
Cookie variable values were retained.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
krisrajz
Guest
Posts: n/a
 
      03-08-2005
Indeed, tons of thanx.

I've got installed SP4 on my machine which version of SP would fix my error.

TIA
RAJ.


"Bob Barrows [MVP]" wrote:

> krisrajz wrote:
> > Please observe the code snippet
> >
> > Shot #1
> >
> > sample1.asp
> >
> > <%
> > Session("test")="Session Testing"
> > Response.Cookies("cookietest")="Cookie Testing"
> > Response.write Session("test")
> > Response.Write Response.Cookies("cookietest")
> > %>
> >
> > Does outputs Session Testing and Cookie Testing where as shot #2 does
> > output anything:
> >
> > Shot #2
> >
> > sample1.asp
> >
> > <%
> > Session("test")="Session Testing"
> > Response.Cookies("cookietest")="Cookie Testing"
> > Response.Redirect "sample2.asp"
> > %>
> >
> > sample2.asp
> >
> > <%
> > Response.Write Session("test")
> > Response.Write Response.Cookies("cookietest")
> > %>
> >
> > I've tested those pages on Avant Browser ( which is also IE based),
> > it too behaves as IE does. When I test pages on Opera, Netscape
> > Navigator the pages does output.

>
>
> I tested your code on my machine and discovered that the Redirect was the
> problem. I changed the code to this:
>
> <%
> Session("test")="Session Testing"
> Response.Cookies("cookietest")="Cookie Testing"
> Response.Redirect "Sample2.asp?SessID=" & session.SessionID
> %>
>
> <%
> Response.Write Session.SessionID & "<BR>"
> Response.Write Session("test") & "<BR>"
> Response.Write Request.Cookies("cookietest")
> %>
>
>
> And discovered that Redirect was causing a new session to be initiated. I
> don't remember this behavior occurring so a recent service pack must be
> responsible.
>
> When I changed "Response.Redirect" to "Server.Transfer", the Session and
> Cookie variable values were retained.
>
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      03-08-2005
You don't understand. Recent SP's for IE have been tightening security. I do
not believe that a SP will be released to reverse this change.

Bob Barrows

krisrajz wrote:
> Indeed, tons of thanx.
>
> I've got installed SP4 on my machine which version of SP would fix my
> error.
>
> TIA
> RAJ.
>
>
> "Bob Barrows [MVP]" wrote:
>
>> krisrajz wrote:
>>> Please observe the code snippet
>>>
>>> Shot #1
>>>
>>> sample1.asp
>>>
>>> <%
>>> Session("test")="Session Testing"
>>> Response.Cookies("cookietest")="Cookie Testing"
>>> Response.write Session("test")
>>> Response.Write Response.Cookies("cookietest")
>>> %>
>>>
>>> Does outputs Session Testing and Cookie Testing where as shot #2
>>> does output anything:
>>>
>>> Shot #2
>>>
>>> sample1.asp
>>>
>>> <%
>>> Session("test")="Session Testing"
>>> Response.Cookies("cookietest")="Cookie Testing"
>>> Response.Redirect "sample2.asp"
>>> %>
>>>
>>> sample2.asp
>>>
>>> <%
>>> Response.Write Session("test")
>>> Response.Write Response.Cookies("cookietest")
>>> %>
>>>
>>> I've tested those pages on Avant Browser ( which is also IE based),
>>> it too behaves as IE does. When I test pages on Opera, Netscape
>>> Navigator the pages does output.

>>
>>
>> I tested your code on my machine and discovered that the Redirect
>> was the problem. I changed the code to this:
>>
>> <%
>> Session("test")="Session Testing"
>> Response.Cookies("cookietest")="Cookie Testing"
>> Response.Redirect "Sample2.asp?SessID=" & session.SessionID
>> %>
>>
>> <%
>> Response.Write Session.SessionID & "<BR>"
>> Response.Write Session("test") & "<BR>"
>> Response.Write Request.Cookies("cookietest")
>> %>
>>
>>
>> And discovered that Redirect was causing a new session to be
>> initiated. I don't remember this behavior occurring so a recent
>> service pack must be responsible.
>>
>> When I changed "Response.Redirect" to "Server.Transfer", the Session
>> and Cookie variable values were retained.
>>
>> Bob Barrows
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      03-08-2005
krisrajz wrote:
> What's wrong with IE?


[...Must...resist...temptation...]

Regarding this specific issue, one thing is wrong with Internet Explorer. IE
attempts to guess when it should share sessions between browser windows. The
problem isn't that IE has this ability. The problem is that the user (and
consequently the developer) has no control over it.



> ...Do I need to disregard IE and to opt for other browsers?


That's a virtual impossibility, isn't it? All recent estimates I've seen put
IE saturation between 80% and 89% of the UA population. Rather than
disregard IE, you will have to learn to embrace what it *can* do, and pine
for what it *could* do (e.g. CSS attribute selectors).



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Cookie Script: Not recognising Cookie Jimbo Python 1 04-08-2010 07:34 AM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
So is win2k support being wound down, or not? thing2 NZ Computing 6 08-08-2005 09:51 PM
Power button does not turn OFF? New power supply does not help! win2k lbbss Computer Support 0 01-06-2005 04:03 PM
win98 on c:, win2k on d: boot.ini only shows win2k thing NZ Computing 3 08-15-2004 06:47 PM



Advertisments