Professional Web Applications Themes

Losing Session variables - ASP.NET General

- 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 ...

  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. #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.fullerL-3com.com> wrote in message
    news:018a01c35b74$f19d2ed0$a301280aphx.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

  3. #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.fullerL-3com.com> wrote in message
    >news:018a01c35b74$f19d2ed0$a301280aphx.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

Similar Threads

  1. Losing client variables
    By jojo in forum Coldfusion Server Administration
    Replies: 2
    Last Post: November 2nd, 10:30 PM
  2. SOLVED [PHP] SESSION variables losing data on WinXP?
    By Jami in forum PHP Development
    Replies: 0
    Last Post: September 19th, 07:33 AM
  3. [PHP] SESSION variables losing data on WinXP?
    By Larry Li in forum PHP Development
    Replies: 4
    Last Post: September 18th, 05:57 AM
  4. losing a session?
    By Gerard L Petersen in forum PHP Development
    Replies: 1
    Last Post: August 19th, 05:05 PM
  5. Losing Session Variables?
    By vivek in forum ASP
    Replies: 7
    Last Post: August 7th, 08:24 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