Reputation: 3736
I have a Session object in my asp.net app that I am setting to the userID value. The session object gets instantiated in the gloal.asax. The value is being set on a button_click event when a user signs in and has been authenticated.
However, somewhere somehow in my app, the Session is being set to Empty. How can I determine where and how the session object is being set to empty?
Upvotes: 4
Views: 1292
Reputation: 2982
Do a global search for the session variable within your project. Put a break point on all of the lines. and then closely step through the application. I just had the same bug two days ago. Took four hours stepping through 80+ pages. Good luck.
Upvotes: 3
Reputation: 30862
A couple of reasons this may happen:
Page_Load()
?In my experience this kind of problem will almost certainly be addressed by the above.
Upvotes: 1