SessionID Changes in production machine....help

Discussion in 'ASP .Net' started by =?Utf-8?B?UmV6YSBTb2xvdWtp?=, May 13, 2005.

  1. Help,

    I posted another thread here asking help because I was losing my session
    information(got no response). After a lot of searching on different sites I
    discovered that my sessionID changes everytime I submit.
    It doesn't happend with running it inside the visual studio, just when
    running it as a site directly with IE.
    Anyways, I found out if I set
    cookieless="true"
    it solves the problem. However I am not happy with this solution even though
    I don't use cookies, but I have another project
    with cookieless="false"
    that works just fine.

    So I like to hear some suggestions/insight on this from those experts out
    there to at least understand why or find a solution.

    thanks in advance,
    Reza
     
    =?Utf-8?B?UmV6YSBTb2xvdWtp?=, May 13, 2005
    #1
    1. Advertising

  2. Is your browser configured to accept cookies ?

    If it isn't, ASP.NET will interpret each access
    as coming from a new browser.

    cookieless="true" enables ASP.NET to maintain state
    even if the browser isn't configured to accept cookies.

    cookieless="false" works only if the browser accepts cookies.

    Everything is working as it should. It's your call to make.
    Your choice.



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "Reza Solouki" <> wrote in message
    news:...
    > Help,
    >
    > I posted another thread here asking help because I was losing my session
    > information(got no response). After a lot of searching on different sites I
    > discovered that my sessionID changes everytime I submit.
    > It doesn't happend with running it inside the visual studio, just when
    > running it as a site directly with IE.
    > Anyways, I found out if I set
    > cookieless="true"
    > it solves the problem. However I am not happy with this solution even though
    > I don't use cookies, but I have another project
    > with cookieless="false"
    > that works just fine.
    >
    > So I like to hear some suggestions/insight on this from those experts out
    > there to at least understand why or find a solution.
    >
    > thanks in advance,
    > Reza
     
    Juan T. Llibre, May 13, 2005
    #2
    1. Advertising

  3. My browser is configured to accept cookies, so really I shouldn't have to
    change the setting of cookieless from default value of false to true!

    So the question is, is there some thing else that could cause the sessionid
    to keep changing with each sumbit?



    "Juan T. Llibre" wrote:

    > Is your browser configured to accept cookies ?
    >
    > If it isn't, ASP.NET will interpret each access
    > as coming from a new browser.
    >
    > cookieless="true" enables ASP.NET to maintain state
    > even if the browser isn't configured to accept cookies.
    >
    > cookieless="false" works only if the browser accepts cookies.
    >
    > Everything is working as it should. It's your call to make.
    > Your choice.
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > Ven, y hablemos de ASP.NET...
    > ======================
    >
    > "Reza Solouki" <> wrote in message
    > news:...
    > > Help,
    > >
    > > I posted another thread here asking help because I was losing my session
    > > information(got no response). After a lot of searching on different sites I
    > > discovered that my sessionID changes everytime I submit.
    > > It doesn't happend with running it inside the visual studio, just when
    > > running it as a site directly with IE.
    > > Anyways, I found out if I set
    > > cookieless="true"
    > > it solves the problem. However I am not happy with this solution even though
    > > I don't use cookies, but I have another project
    > > with cookieless="false"
    > > that works just fine.
    > >
    > > So I like to hear some suggestions/insight on this from those experts out
    > > there to at least understand why or find a solution.
    > >
    > > thanks in advance,
    > > Reza

    >
    >
    >
     
    =?Utf-8?B?UmV6YSBTb2xvdWtp?=, May 13, 2005
    #3
  4. re:
    > is there some thing else that could cause
    > the sessionid to keep changing with each submit?


    There is nothing that could cause that, except the cookieless setting.

    1. Make sure your web.config syntax is correct.

    2. Check your browser settings again.

    Are you using InProc Session State ?



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "Reza Solouki" <> wrote in message
    news:...
    > My browser is configured to accept cookies, so really I shouldn't have to
    > change the setting of cookieless from default value of false to true!
    >
    > So the question is, is there some thing else that could cause the sessionid
    > to keep changing with each sumbit?


    > "Juan T. Llibre" wrote:
    >
    >> Is your browser configured to accept cookies ?
    >>
    >> If it isn't, ASP.NET will interpret each access
    >> as coming from a new browser.
    >>
    >> cookieless="true" enables ASP.NET to maintain state
    >> even if the browser isn't configured to accept cookies.
    >>
    >> cookieless="false" works only if the browser accepts cookies.
    >>
    >> Everything is working as it should. It's your call to make.
    >> Your choice.
    >>
    >>
    >>
    >> Juan T. Llibre
    >> ASP.NET MVP
    >> http://asp.net.do/foros/
    >> Foros de ASP.NET en Español
    >> Ven, y hablemos de ASP.NET...
    >> ======================
    >>
    >> "Reza Solouki" <> wrote in message
    >> news:...
    >> > Help,
    >> >
    >> > I posted another thread here asking help because I was losing my session
    >> > information(got no response). After a lot of searching on different sites I
    >> > discovered that my sessionID changes everytime I submit.
    >> > It doesn't happend with running it inside the visual studio, just when
    >> > running it as a site directly with IE.
    >> > Anyways, I found out if I set
    >> > cookieless="true"
    >> > it solves the problem. However I am not happy with this solution even though
    >> > I don't use cookies, but I have another project
    >> > with cookieless="false" that works just fine.
    >> >
    >> > So I like to hear some suggestions/insight on this from those experts out
    >> > there to at least understand why or find a solution.
    >> >
    >> > thanks in advance,
    >> > Reza
     
    Juan T. Llibre, May 13, 2005
    #4
  5. Juan,
    Here is the exact code:
    <sessionState
    mode="InProc"
    stateConnectionString="tcpip=127.0.0.1:42424"
    sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    cookieless="false"
    timeout="20"
    />
    as it gives the problem, but when I change the cookieless="true" it works
    fine.
    However, I have another project with the same exact setting that uses
    cookies which works fine!? (so it couldn't be the browser settings)

    Just one more thing, this problem started/noticed when I added a 2nd grid to
    some of my pages where the arraylist feeding the grid is being kept in
    session till finalized to database.


    "Juan T. Llibre" wrote:

    > re:
    > > is there some thing else that could cause
    > > the sessionid to keep changing with each submit?

    >
    > There is nothing that could cause that, except the cookieless setting.
    >
    > 1. Make sure your web.config syntax is correct.
    >
    > 2. Check your browser settings again.
    >
    > Are you using InProc Session State ?
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > Ven, y hablemos de ASP.NET...
    > ======================
    >
    > "Reza Solouki" <> wrote in message
    > news:...
    > > My browser is configured to accept cookies, so really I shouldn't have to
    > > change the setting of cookieless from default value of false to true!
    > >
    > > So the question is, is there some thing else that could cause the sessionid
    > > to keep changing with each sumbit?

    >
    > > "Juan T. Llibre" wrote:
    > >
    > >> Is your browser configured to accept cookies ?
    > >>
    > >> If it isn't, ASP.NET will interpret each access
    > >> as coming from a new browser.
    > >>
    > >> cookieless="true" enables ASP.NET to maintain state
    > >> even if the browser isn't configured to accept cookies.
    > >>
    > >> cookieless="false" works only if the browser accepts cookies.
    > >>
    > >> Everything is working as it should. It's your call to make.
    > >> Your choice.
    > >>
    > >>
    > >>
    > >> Juan T. Llibre
    > >> ASP.NET MVP
    > >> http://asp.net.do/foros/
    > >> Foros de ASP.NET en Español
    > >> Ven, y hablemos de ASP.NET...
    > >> ======================
    > >>
    > >> "Reza Solouki" <> wrote in message
    > >> news:...
    > >> > Help,
    > >> >
    > >> > I posted another thread here asking help because I was losing my session
    > >> > information(got no response). After a lot of searching on different sites I
    > >> > discovered that my sessionID changes everytime I submit.
    > >> > It doesn't happend with running it inside the visual studio, just when
    > >> > running it as a site directly with IE.
    > >> > Anyways, I found out if I set
    > >> > cookieless="true"
    > >> > it solves the problem. However I am not happy with this solution even though
    > >> > I don't use cookies, but I have another project
    > >> > with cookieless="false" that works just fine.
    > >> >
    > >> > So I like to hear some suggestions/insight on this from those experts out
    > >> > there to at least understand why or find a solution.
    > >> >
    > >> > thanks in advance,
    > >> > Reza

    >
    >
    >
     
    =?Utf-8?B?UmV6YSBTb2xvdWtp?=, May 13, 2005
    #5
  6. re:
    > Just one more thing, this problem started/noticed when I added
    > a 2nd grid to some of my pages where the arraylist feeding the
    > grid is being kept in session till finalized to database.


    Aha! The mystery begins to unravel.

    Not having your code to look at, I can only suggest that you
    start tinkering with it, until you find the reason for the sessions
    being reinitialized.

    Maintaining state in objects stored in the Session Object is tricky.




    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    Ven, y hablemos de ASP.NET...
    ======================

    "Reza Solouki" <> wrote in message
    news:...
    > Juan,
    > Here is the exact code:
    > <sessionState
    > mode="InProc"
    > stateConnectionString="tcpip=127.0.0.1:42424"
    > sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    > cookieless="false"
    > timeout="20"
    > />
    > as it gives the problem, but when I change the cookieless="true" it works
    > fine.
    > However, I have another project with the same exact setting that uses
    > cookies which works fine!? (so it couldn't be the browser settings)
    >
    > Just one more thing, this problem started/noticed when I added a 2nd grid to
    > some of my pages where the arraylist feeding the grid is being kept in
    > session till finalized to database.
    >
    >
    > "Juan T. Llibre" wrote:
    >
    >> re:
    >> > is there some thing else that could cause
    >> > the sessionid to keep changing with each submit?

    >>
    >> There is nothing that could cause that, except the cookieless setting.
    >>
    >> 1. Make sure your web.config syntax is correct.
    >>
    >> 2. Check your browser settings again.
    >>
    >> Are you using InProc Session State ?
    >>
    >>
    >>
    >> Juan T. Llibre
    >> ASP.NET MVP
    >> http://asp.net.do/foros/
    >> Foros de ASP.NET en Español
    >> Ven, y hablemos de ASP.NET...
    >> ======================
    >>
    >> "Reza Solouki" <> wrote in message
    >> news:...
    >> > My browser is configured to accept cookies, so really I shouldn't have to
    >> > change the setting of cookieless from default value of false to true!
    >> >
    >> > So the question is, is there some thing else that could cause the sessionid
    >> > to keep changing with each sumbit?

    >>
    >> > "Juan T. Llibre" wrote:
    >> >
    >> >> Is your browser configured to accept cookies ?
    >> >>
    >> >> If it isn't, ASP.NET will interpret each access
    >> >> as coming from a new browser.
    >> >>
    >> >> cookieless="true" enables ASP.NET to maintain state
    >> >> even if the browser isn't configured to accept cookies.
    >> >>
    >> >> cookieless="false" works only if the browser accepts cookies.
    >> >>
    >> >> Everything is working as it should. It's your call to make.
    >> >> Your choice.
    >> >>
    >> >>
    >> >>
    >> >> Juan T. Llibre
    >> >> ASP.NET MVP
    >> >> http://asp.net.do/foros/
    >> >> Foros de ASP.NET en Español
    >> >> Ven, y hablemos de ASP.NET...
    >> >> ======================
    >> >>
    >> >> "Reza Solouki" <> wrote in message
    >> >> news:...
    >> >> > Help,
    >> >> >
    >> >> > I posted another thread here asking help because I was losing my session
    >> >> > information(got no response). After a lot of searching on different sites I
    >> >> > discovered that my sessionID changes everytime I submit.
    >> >> > It doesn't happend with running it inside the visual studio, just when
    >> >> > running it as a site directly with IE.
    >> >> > Anyways, I found out if I set
    >> >> > cookieless="true"
    >> >> > it solves the problem. However I am not happy with this solution even though
    >> >> > I don't use cookies, but I have another project
    >> >> > with cookieless="false" that works just fine.
    >> >> >
    >> >> > So I like to hear some suggestions/insight on this from those experts out
    >> >> > there to at least understand why or find a solution.
    >> >> >
    >> >> > thanks in advance,
    >> >> > Reza

    >>
    >>
    >>
     
    Juan T. Llibre, May 13, 2005
    #6
    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. Ronald
    Replies:
    6
    Views:
    7,085
    Andy Mortimer [MS]
    Feb 23, 2004
  2. Steve C. Orr [MVP, MCSD]

    Re: HELP - SessionID changes when using FRAMES

    Steve C. Orr [MVP, MCSD], Sep 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    493
    Steve C. Orr [MVP, MCSD]
    Sep 1, 2004
  3. Seth Darr
    Replies:
    2
    Views:
    528
    Seth Darr
    Oct 6, 2004
  4. Patrice
    Replies:
    0
    Views:
    851
    Patrice
    Apr 12, 2010
  5. Jeff White

    Form Validation/SessionID changes

    Jeff White, Aug 11, 2004, in forum: ASP .Net Security
    Replies:
    4
    Views:
    154
    Jeff White
    Aug 13, 2004
Loading...

Share This Page