HttpContext.Current return null in IIS 7
One of my team member was complaining to me that, the application works good at his development system but, when deployed to QC, the particular page throws a null exception.
I found that, the code ‘HttpContext.Current.Session[Constant.SortDirection]‘ is causing the error and the Current is null.
Inorder to fix this issue, the Session state should be set properly for the application in IIS.
Earlier, Session state was disabled because of which, the Current object is null. After setting the Session state, it worked correctly.

2 Comments »
Leave a Reply
-
Archives
- April 2013 (1)
- February 2013 (1)
- October 2012 (3)
- September 2012 (5)
- August 2012 (4)
- June 2012 (1)
- May 2012 (2)
- April 2012 (2)
- October 2011 (1)
- September 2011 (4)
- August 2011 (3)
- July 2011 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS


I applied settings as above. But still not working for me.. Still the Session variable is null while running from IIS7 .It works fine when I run it from development application.
What is the IIS version in your dev system? Could you please post the code block where you are experiencing null session state?