Professional Web Applications Themes

Losing Session in a Popup Window - ASP.NET General

When we open a window (using client-side jscript ie. window.open("/Site/Popup.aspx?...",...)) from Page1.aspx, the called page Popup.aspx does not have access to the Session variables present in Page1.aspx. The IIS Log shows (listed below) shows that the ASP.NET_SessionId cookie is not present in Popup.aspx. The thing is that this mechanism works for 99% of our users. There is this one user that is consistently having this problem. As you can see from the log, this user is on IE6 and has Windows NT. Any ideas on how to debug this or resolve this? #Fields: date time c-ip s-port cs-method cs-uri-stem cs-uri-query ...

  1. #1

    Default Losing Session in a Popup Window

    When we open a window (using client-side jscript ie.
    window.open("/Site/Popup.aspx?...",...)) from Page1.aspx, the called
    page Popup.aspx does not have access to the Session variables present
    in Page1.aspx. The IIS Log shows (listed below) shows that the
    ASP.NET_SessionId cookie is not present in Popup.aspx.

    The thing is that this mechanism works for 99% of our users. There is
    this one user that is consistently having this problem. As you can
    see from the log, this user is on IE6 and has Windows NT.

    Any ideas on how to debug this or resolve this?

    #Fields: date time c-ip s-port cs-method cs-uri-stem cs-uri-query
    sc-status cs(User-Agent) cs(Cookie)
    2003-08-22 16:57:51 278.179.45.71 443 GET /Site/Page1.aspx
    action=Edit%20a%20Driver 200
    Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)
    ASP.NET_SessionId=yarvyqz3hl11yda3vouk2x55
    2003-08-22 16:57:59 278.179.45.71 443 GET /Site/Popup/Lookup_Orgs.aspx
    Level1Text=BROTHERS%20CO 200
    Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) -
    2003-08-22 16:58:12 278.179.45.71 443 GET /Site/logout.aspx - 200
    Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)
    ASP.NET_SessionId=yarvyqz3hl11yda3vouk2x55
    Jimmy Guest

  2. #2

    Default Re: Losing Session in a Popup Window

    Kevin,

    If the user is using IE6, what are you saying?
    Is it a setup issue.
    or a random some do some don't
    ??
    Thanks

    "Kevin Spencer" <com> wrote in message
    news:phx.gbl... 
    >
    >[/ref]


    MS Guest

  3. #3

    Default Re: Losing Session in a Popup Window

    I'm not saying anything regarding the specific browser he mentioned (I don't
    know specifically about IE6). I'm saying what I said: You can't count on the
    browser that the user is using to share Sessions across browser instances.
    Some [browsers] do, and some don't. If he knew that all of his users were
    going to use the same browser, this might be a viable method, but since he
    doesn't, it's not.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "MS News (MS ILM)" <com> wrote in message
    news:phx.gbl... 
    > >
    > >[/ref]
    >
    >[/ref]


    Kevin Guest

  4. #4

    Default Re: Losing Session in a Popup Window

    Kevin,

    He said the following:
     [/ref][/ref]

    Since this only one user is on IE6, I got confused to what you said.

    Thank you.


    "Kevin Spencer" <com> wrote in message
    news:%23CsG$phx.gbl... 
    don't 
    the [/ref][/ref]
    Sessions [/ref][/ref]
    present [/ref][/ref]
    is [/ref][/ref]
    /Site/Popup/Lookup_Orgs.aspx 
    > >
    > >[/ref]
    >
    >[/ref]


    MS Guest

  5. #5

    Default Re: Losing Session in a Popup Window

    Jimmy,

    Since this user is using IE sessions should be maintained it is most likely
    that this user has cookies disabled. Sessions use cookies to store the
    session ID on the client.

    Kevin is right unless users are using the same browser AND have cookies
    enabled you can't count on sessions.

    There are two things you can try. You could set your app to use cookieless
    sessions (use web.config file to do so.) This puts the session ID into the
    query string (make sure to get the session id out of the query string if you
    use javascript to open a new window and put it in the url.) Or you could
    check if users have cookies enabled Request.Browser.Cookies and redirect the
    user to a page telling them why they need to enable cookies and how to do
    so.

    If Not Request.Browser.Cookies Then
    Response.Redirect("musthavecookies.aspx")
    End If

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzche


    "Jimmy Junatas" <com> wrote in message
    news:google.com... 


    S. Guest

  6. #6

    Default Re: Losing Session in a Popup Window

    I knew that the user in question was using IE6, but since I din't know for
    sure that IE6 doesn't share Sessions across browser instances (it sounds
    like not), I just gave him the important information, that is, etc.

    I can certainly appreciate your confusion. I get confused every day, and not
    always on purpose! ;-)

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.

    "MS News (MS ILM)" <com> wrote in message
    news:phx.gbl... [/ref][/ref]
    is [/ref]
    >
    > Since this only one user is on IE6, I got confused to what you said.
    >
    > Thank you.
    >
    >
    > "Kevin Spencer" <com> wrote in message
    > news:%23CsG$phx.gbl... 
    > don't 
    > the [/ref]
    instances. [/ref]
    were [/ref]
    he [/ref]
    > Sessions [/ref][/ref]
    called [/ref]
    > present [/ref][/ref]
    There [/ref][/ref]
    can [/ref]
    > /Site/Popup/Lookup_Orgs.aspx 
    > >
    > >[/ref]
    >
    >[/ref]


    Kevin Guest

  7. #7

    Default Re: Losing Session in a Popup Window

    Same here thanks

    "Kevin Spencer" <com> wrote in message
    news:phx.gbl... 
    not [/ref][/ref]
    There [/ref][/ref]
    can 
    > >
    > > Since this only one user is on IE6, I got confused to what you said.
    > >
    > > Thank you.
    > >
    > >
    > > "Kevin Spencer" <com> wrote in message
    > > news:%23CsG$phx.gbl... 
    > > don't [/ref][/ref]
    on [/ref]
    > instances. [/ref]
    > were [/ref][/ref]
    since 
    > > Sessions [/ref]
    > called 
    > > present [/ref]
    > There [/ref]
    > can [/ref][/ref]
    cs-uri-query 
    > > /Site/Popup/Lookup_Orgs.aspx [/ref][/ref]
    200 
    > >
    > >[/ref]
    >
    >[/ref]


    MS Guest

  8. #8

    Default Re: Losing Session in a Popup Window

    Thanks everyone for their inputs.

    Using Cookieless sessions is certainly an option but I don't want to
    rock the boat too much given that only one user (so far) is
    experiencing this problem.

    In this particular scenario, I am also hesitant about sharing
    information thru the QueryString or hidden fields the data being
    shared is somewhat sensitive (the site is for a bank).

    As for checking for cookies, we actually already have a check at login
    that requires that the user has IE5 (and up) and that cookie support
    (and Javascript) are enabled.

    And also, the rest of the site works for that user (so the session
    cookie must have been persisted in the client). Only that popup
    window page fails.

    I did learn yesterday that the user has IE 6.0.2600 Update Version :
    Q319182. I saw numerous posts yesterday complaining about Q319182.
    I'll see about upgrading that user to latest IE6 service pack.


    "S. Justin Gengo" <com> wrote in message news:<phx.gbl>... [/ref]
    Jimmy Guest

Similar Threads

  1. Open popup window from non graphic window
    By The in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: June 23rd, 03:42 PM
  2. Setting a popup window's base target to caller window?
    By saf_123 in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: July 6th, 11:01 AM
  3. Popup menu on popup window
    By Peepio in forum Macromedia Flex General Discussion
    Replies: 5
    Last Post: July 5th, 03:26 PM
  4. Losing session on xp ie6
    By babyeatingreptile in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: March 21st, 09:10 PM
  5. can a popup window return data to parent window?
    By nadia in forum PHP Development
    Replies: 3
    Last Post: September 25th, 08:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139