Session Variables work from Page1 to Page2 / lost from Page2 to Page3

Discussion in 'ASP .Net' started by P. Prosper, Jun 7, 2005.

  1. P. Prosper

    P. Prosper Guest

    Hello all

    I have a small webform application with three WebForms that use session
    variables to maintain session data (user name)

    When I transfer to page 2 from page1 session state is transferred OK, but is
    lost when I use a command button to transfer from page2 to page3.

    It seem to have something to do with a timeout of some sort because if I
    transfer from page2 loadEvent directly to page3,
    the session variable is maintained.

    I have disabled my anti virus software completely.

    I have checked in my cookies folder and the cookie is just not being created
    (IE is set to prompt before accepting cookies)

    I am using VS.NET 2003 and ASP.NET 1.1

    Any suggestions / tip would be greatly appreciated

    my web config is as follows

    <sessionState

    mode="InProc"

    stateConnectionString="tcpip=127.0.0.1:42424"

    sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"

    cookieless="false"

    timeout="20"

    />
     
    P. Prosper, Jun 7, 2005
    #1
    1. Advertising

  2. P. Prosper

    P. Prosper Guest

    Forgot to mention : my dev machine runs XP-PRO

    "P. Prosper" <none@none> wrote in message
    news:...
    >
    > Hello all
    >
    > I have a small webform application with three WebForms that use session
    > variables to maintain session data (user name)
    >
    > When I transfer to page 2 from page1 session state is transferred OK, but

    is
    > lost when I use a command button to transfer from page2 to page3.
    >
    > It seem to have something to do with a timeout of some sort because if I
    > transfer from page2 loadEvent directly to page3,
    > the session variable is maintained.
    >
    > I have disabled my anti virus software completely.
    >
    > I have checked in my cookies folder and the cookie is just not being

    created
    > (IE is set to prompt before accepting cookies)
    >
    > I am using VS.NET 2003 and ASP.NET 1.1
    >
    > Any suggestions / tip would be greatly appreciated
    >
    > my web config is as follows
    >
    > <sessionState
    >
    > mode="InProc"
    >
    > stateConnectionString="tcpip=127.0.0.1:42424"
    >
    > sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    >
    > cookieless="false"
    >
    > timeout="20"
    >
    > />
    >
    >
     
    P. Prosper, Jun 7, 2005
    #2
    1. Advertising

  3. RE: Session Variables work from Page1 to Page2 / lost from Page2 to Pa

    I've just solved a very similar problem to this one - have you checked what
    URL you are using to access the front page of the site? Is it possible that
    when you get as far as page 3, the application starts using a different URL.

    My problem was that the user was using an IP address stored in his
    Favourties list to connect to page 1 (eg http://123.4.5.6/login). He logged
    in, and was redirected to page 2 via a relative URL (http://123.4.5.6/home).
    The user clicks on a hyperlink to go to page 3, and they are redirected to an
    absolute URL that uses a domain alias (eg http://www.myapp.com/search) - but
    IE thinks its being redirected to an entirely different website, so it drops
    the Session ID it should have sent to the server to identify itself. The user
    then gets sent back to page 1, this time with the domain alias
    (http://www.myapp.com/login) - and so this time, the login works as expected.

    See if that works for you.

    Paul


    "P. Prosper" wrote:

    >
    > Hello all
    >
    > I have a small webform application with three WebForms that use session
    > variables to maintain session data (user name)
    >
    > When I transfer to page 2 from page1 session state is transferred OK, but is
    > lost when I use a command button to transfer from page2 to page3.
    >
    > It seem to have something to do with a timeout of some sort because if I
    > transfer from page2 loadEvent directly to page3,
    > the session variable is maintained.
    >
    > I have disabled my anti virus software completely.
    >
    > I have checked in my cookies folder and the cookie is just not being created
    > (IE is set to prompt before accepting cookies)
    >
    > I am using VS.NET 2003 and ASP.NET 1.1
    >
    > Any suggestions / tip would be greatly appreciated
    >
    > my web config is as follows
    >
    > <sessionState
    >
    > mode="InProc"
    >
    > stateConnectionString="tcpip=127.0.0.1:42424"
    >
    > sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    >
    > cookieless="false"
    >
    > timeout="20"
    >
    > />
     
    =?Utf-8?B?UGF1bCBI?=, Aug 26, 2005
    #3
    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. gupta
    Replies:
    1
    Views:
    690
  2. Eliyahu Goldin

    Lost session variables - size issue?

    Eliyahu Goldin, Jan 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    383
    Chris Botha
    Jan 14, 2004
  3. Karol
    Replies:
    0
    Views:
    503
    Karol
    Jul 11, 2007
  4. seep

    populate page 2.aspx labels with values from page1

    seep, Nov 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    142
    Robert Koritnik
    Nov 3, 2004
  5. yabba

    page1 page2 ????

    yabba, Sep 2, 2004, in forum: ASP General
    Replies:
    5
    Views:
    118
    Jeff Cochran
    Sep 3, 2004
Loading...

Share This Page