Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
2248 Points
832 Posts
Jun 02, 2011 06:42 PM|LINK
I'm trying to create a session variable (for a 3rd party application) in the httpModule for our site and I'm getting a NullReferenceException.
Example code:
httpContext.Current.Session(strSessionVar) = objDR("MemID").ToString & Chr(1) & objDR("lastLogin").ToString
I've already checked and objDR("MemID") is not NULL and neither is objDR("lastLogin"). strSessionVar contains a valid string (something like "ab_SessionInfo"). httpContext.Current.Session, however, IS Nothing....
Any ideas?
ojm37
Contributor
2248 Points
832 Posts
Creating a Session Variable in an httpModule: NullReferenceException
Jun 02, 2011 06:42 PM|LINK
I'm trying to create a session variable (for a 3rd party application) in the httpModule for our site and I'm getting a NullReferenceException.
Example code:
httpContext.Current.Session(strSessionVar) = objDR("MemID").ToString & Chr(1) & objDR("lastLogin").ToStringI've already checked and objDR("MemID") is not NULL and neither is objDR("lastLogin"). strSessionVar contains a valid string (something like "ab_SessionInfo"). httpContext.Current.Session, however, IS Nothing....
Any ideas?