Losing Session variables

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Losing Session variables

    - We have 2 aspx pages in a .NET project. The first sets
    a session variable and has a button that when clicked
    performs a 'redirect' to the second page which then reads
    the session variable.

    Problem: This always works fine on the localserver and
    through the IDE. But when the application is put onto a
    www website, the following occurs;
    - If you browse to the site using the IP address, session
    variables work fine
    - If you browse to the site using the Web Site Domain Name
    (ie [url]http://www.tmcontrol.com[/url]) session variables are NOT
    retrieved properly. Further investigation included
    outputting the value of Session.SessionID. In the cases
    where session variables were working (IP browsing) the
    SessionID matches for both pages. In the case of failure
    (name browsing), the SessionIDs are different indicating a
    new session.

    We tried to workaround this issue by setting SessionState
    cookieless to "true" in web.config and while this seems to
    correct the session problem, it causes problems with Form
    data being returned from Verisign in later processing.

    GFuller Guest

  2. Similar Questions and Discussions

    1. Losing client variables
      Hi All I'm running CFMX7 on a win 2003 server, fully patched. Every so often CF seems t lose track of client variables, the client variables...
    2. SOLVED [PHP] SESSION variables losing data on WinXP?
      In case anyone else runs into this problem, the way I solved it was by reinstalling php with the windows installer from php.net. I'm not exactly...
    3. [PHP] SESSION variables losing data on WinXP?
      I believe all pages in your site are protected by session variables. Try to login first, then go where you want to go. Or try to remark codes which...
    4. losing a session?
      Hi Is it possible to lose a session? For instance if on www.coke.com $_SESSION = x; is set and on www.pepsi.com $_SESSION = notX; is set. ...
    5. Losing Session Variables?
      Do any of you guys have any idea what might be the reason for losing session variables, i was working on a page where i had to stroe a array in a...
  3. #2

    Default Re: Losing Session variables

    you may want to use Server.Transfer('page',true) instead of redirect to
    ensure that the session state is preserved.

    "GFuller" <greg.fuller@L-3com.com> wrote in message
    news:018a01c35b74$f19d2ed0$a301280a@phx.gbl...
    > - We have 2 aspx pages in a .NET project. The first sets
    > a session variable and has a button that when clicked
    > performs a 'redirect' to the second page which then reads
    > the session variable.
    >
    > Problem: This always works fine on the localserver and
    > through the IDE. But when the application is put onto a
    > www website, the following occurs;
    > - If you browse to the site using the IP address, session
    > variables work fine
    > - If you browse to the site using the Web Site Domain Name
    > (ie [url]http://www.tmcontrol.com[/url]) session variables are NOT
    > retrieved properly. Further investigation included
    > outputting the value of Session.SessionID. In the cases
    > where session variables were working (IP browsing) the
    > SessionID matches for both pages. In the case of failure
    > (name browsing), the SessionIDs are different indicating a
    > new session.
    >
    > We tried to workaround this issue by setting SessionState
    > cookieless to "true" in web.config and while this seems to
    > correct the session problem, it causes problems with Form
    > data being returned from Verisign in later processing.
    >

    Alvin Bruney Guest

  4. #3

    Default Re: Losing Session variables[Solved!!]

    If you have this problem, check that nslookup for your
    domain name actually returns your server's IP address. In
    our case, our ISP was not returning the correct IP address
    which caused the site domain to mismatch with the IP
    causing the 3rd party cookies to alert disallowing session
    vars. We called our ISP and they fixed the problem which
    was caused by a 'Web forwarding' setting.

    Thanks to the Microsoft support lines for solving this one.
    >-----Original Message-----
    >you may want to use Server.Transfer('page',true) instead
    of redirect to
    >ensure that the session state is preserved.
    >
    >"GFuller" <greg.fuller@L-3com.com> wrote in message
    >news:018a01c35b74$f19d2ed0$a301280a@phx.gbl...
    >> - We have 2 aspx pages in a .NET project. The first
    sets
    >> a session variable and has a button that when clicked
    >> performs a 'redirect' to the second page which then
    reads
    >> the session variable.
    >>
    >> Problem: This always works fine on the localserver and
    >> through the IDE. But when the application is put onto a
    >> www website, the following occurs;
    >> - If you browse to the site using the IP address,
    session
    >> variables work fine
    >> - If you browse to the site using the Web Site Domain
    Name
    >> (ie [url]http://www.tmcontrol.com[/url]) session variables are NOT
    >> retrieved properly. Further investigation included
    >> outputting the value of Session.SessionID. In the cases
    >> where session variables were working (IP browsing) the
    >> SessionID matches for both pages. In the case of
    failure
    >> (name browsing), the SessionIDs are different
    indicating a
    >> new session.
    >>
    >> We tried to workaround this issue by setting
    SessionState
    >> cookieless to "true" in web.config and while this seems
    to
    >> correct the session problem, it causes problems with
    Form
    >> data being returned from Verisign in later processing.
    >>
    >
    >
    >.
    >
    gfuller Guest

Posting Permissions

  • You may not post new threads
  • You may 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