I’m using InProc session state and for some odd reason, the session variables are always null when I’m using a page method.
If I do this:
var test = HttpContext.Current.Session["test"];
it’s showing nothing when I’m running on a page method but if I continue debugging and open another page, it’s showing its expected result. I can’t post all the code of the app so where should I start looking?
web.config file looks like this:
<sessionState mode="InProc"/>
Thanks.
If you are setting “test ” in a
masterpageit will be null in thewebmethod. Awebmethoddoesn’t know anything aboutmasterpages.