Problems with Session State

  • Thread starter Thread starter Jeff Shantz
  • Start date Start date
J

Jeff Shantz

Hello,

I've got two classes: EventLog and ErrorLog. I need to access Session
state from these classes, but they are not associated with ASPX pages.
So I've been accessing the Session object through
HttpContext.Current.Session["someVar"].

This was working fine for several months. Suddenly, ErrorLog stopped
being able to "see" the Session object. I made no changes, so I'm
frankly quite stumped. They both import the same namespaces, yet when
ErrorLog is executing and I set a watch on
"HttpContext.Current.Session", it shows as "<undefined value>".

Any ideas? Thanks.

Regards,
Jeff Shantz
 
Is your Eventlog and Errorlog objects are running in the process of ASP.NET.
If it is running in different process then you cant access the context
across processes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top