Solved

Consistent SessionID C#

Posted on 2009-07-09
4
637 Views
Last Modified: 2012-05-07
I am trying to get the SessionID using Session.SessionID.ToString()
But everytime the code is fired it gives a different ID but I expected it to stay the same while ever the browser window remained.

What I want is a sustainable ID that I can reference while I user is entering a form. then after the form is completed I would flush the session to force a new one created.

How can I do that with the code?

Thanks in advance,
Andrew.
0
Comment
Question by:andrewmilner
4 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 24820431
It should stay the same  - can we see some code?
0
 
LVL 2

Expert Comment

by:MPDeveloper
ID: 24824730
Are you resetting your App pool each time the code runs? Doesn't matter if the same browser window remains open, if the App pool gets restarted or recycled, you're going to lose that information.
0
 
LVL 21

Expert Comment

by:MogalManic
ID: 24824792
0
 

Accepted Solution

by:
andrewmilner earned 0 total points
ID: 24941801
I had no Global.asax file in my build which seampt to be the problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now