IE DOES NOT SUPPORT COOKIE on WIN2K and XP

Discussion in 'ASP General' started by krisrajz, Mar 7, 2005.

  1. krisrajz

    krisrajz Guest

    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?
    krisrajz, Mar 7, 2005
    #1
    1. Advertising

  2. 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"
    Bob Barrows [MVP], Mar 7, 2005
    #2
    1. Advertising

  3. 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.
    Dave Anderson, Mar 8, 2005
    #3
  4. krisrajz

    krisrajz Guest

    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.
    >
    >
    >
    krisrajz, Mar 8, 2005
    #4
  5. krisrajz

    krisrajz Guest

    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.
    > >
    > >
    > >
    krisrajz, Mar 8, 2005
    #5
  6. 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"
    Bob Barrows [MVP], Mar 8, 2005
    #6
  7. krisrajz

    krisrajz Guest

    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"
    >
    >
    >
    krisrajz, Mar 8, 2005
    #7
  8. 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.
    Bob Barrows [MVP], Mar 8, 2005
    #8
  9. 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.
    Dave Anderson, Mar 8, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shapper

    Cookie and Session Cookie Questions.

    Shapper, Apr 27, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    548
  2. =?Utf-8?B?UGF1bA==?=

    Cookie Question (IP as domain and cookie file location)

    =?Utf-8?B?UGF1bA==?=, Jan 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,460
    Bruce Barker
    Jan 10, 2006
  3. ad
    Replies:
    2
    Views:
    7,459
    Kevin Spencer
    Jan 27, 2006
  4. Jimbo
    Replies:
    1
    Views:
    644
    Pierre Quentel
    Apr 8, 2010
  5. Eric
    Replies:
    2
    Views:
    458
Loading...

Share This Page