How do I access a asp.net session variable from APP_CODE??
Posted
by user313714
on Stack Overflow
See other posts from Stack Overflow
or by user313714
Published on 2010-04-11T01:00:36Z
Indexed on
2010/04/11
1:03 UTC
Read the original article
Hit count: 320
asp.net-session
|session
I have seen lots of posts here and elsewhere stating that one can access session variables from app_code. I want to access an already created session.
this code errors out because of a null exception. string myFile = HttpContext.Current.Session["UploadedFile"];
this creates a null session variable. System.Web.SessionState.HttpSessionState Session = HttpContext.Current.Session;
It looks like I can create a new session variable but not access an already created one. Anyone have any idea what might be giving me problems?
© Stack Overflow or respective owner