Solved

Consistent SessionID C#

Posted on 2009-07-09
4
649 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

687 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