none
accessing session from a class RRS feed

  • Question

  • First I have sessionState mode="InProc" cookieless="false" timeout="180"  in web.config

    A web page calls a method('A') in a class "MyClass" that creates a session like this:
    System.Web.HttpContext.Current.Session("CHAIN")=12345

    In other web pages - response.write(SESSION("CHAIN")) displays 12345 as it should.

    Now, if I call method('B')  in class "MyClass" that attempts to read 

    System.Web.HttpContext.Current.Session("CHAIN")

    it comes up as a null value, not 12345

    What am I missing?

    Thank you


    GADOI

    Friday, March 9, 2018 5:47 PM

All replies