Solved

Consistent SessionID C#

Posted on 2009-07-09
4
635 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
Comment Utility
It should stay the same  - can we see some code?
0
 
LVL 2

Expert Comment

by:MPDeveloper
Comment Utility
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
Comment Utility
0
 

Accepted Solution

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

19 Experts available now in Live!

Get 1:1 Help Now