Solved

Consistent SessionID C#

Posted on 2009-07-09
4
641 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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