Q:

Session is Null (No session at all) in class, but session does exist when accessing from aspx page

I am working on a multi developer web app. I am trying to sort out an issue that came up with one dev not being able to access session variables in his custom classes.

I synced his changes, and the same issue happens on my dev machine. (I.e., its not IIS specific)
Upon further inspection, the session object completely disappears (there is no session, nto even an empty session with a session ID. Any attempt to access HttpContext.Current.Session throws a null reference exception.
Running the page code again after setting some session variables, shows the variable are all saved and acting normal in the session that I can access from the page itself . (The session object behaves as it normally does)
So to be clear, in the same process, debugging from page through to custom class, the session object is accessible in the page, not existing in custom class, and when returning to the page, its available again.
I have tried setting just a normal string session var to eliminate possible problems with my variable (object) stored in the session. The same issue persists.

Any ideas?

A:

Alrighty then.. always helps to bounce it off a wall :-)
We were using a textbox autocomplete extender that was referencing our own custom webmethod, (inside our app in a custom class). It seem the webmethod decoration forced it to operate stateless... hence no session.
We moved this webmethod decorated function into our page-codebehind page, and it now calls the other custom classes "with" session object availability.

