SessionID Changes in production machine....help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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...
======================
 
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?
 
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...
======================
 
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.
 
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...
======================
 
Back
Top