new session created when changing pages

G

Guest

I have a set of pages with C# code attached to manage session information.
They hang their info off of the session string and store it in a MSDE table.
I have all of this code working well in one app and started another app which
needed much of the same functionality. So I copied the pages, code behinds,
web.config and appropriate DB tables to the new app (all on localhost) and
find that I am get redirected every time I login back to my login because
..IsNewSession always comes up true on the page after the login.

Just in case I messed something up, I went back and checked my old pages and
found that they were behaving fine. I double checked that the login was happy
and creating the DB information, and it is. Asp.Net / IIS seems to just be
creating a new session for every page I load in this second app.

I am hoping that someone has a couple of pointers to save me having to take
this app apart. I'm figuring I missed a setting somewhere, and I am pretty
new at Asp.Net (I had been doing CGI and / or PHP up til 2004).

TIA for any input!

Robb Sadler
 
G

Guest

OK, I have found a clue... I decided to try and add some info into the
session data itself and so put in the line:

System.Web.HttpContext.Current.Session.Add("zot", "zot");

to add some information to the session when I first came upon it. I don't
know why in my previous app I did not need to do this but in the current one
it now returns with the same session when going to a new page (or refreshing
the same one, etc).

Is the session class assuming that I didn't use it since it's data had
nothing added to it?

At this point I have enough info to continue, but would love to get any
comments.

Thanks!

Robb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top