Session with Forms authentication

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Salim Afþar

    #1

    Session with Forms authentication

    Hi,
    I use Forms Authentication type in my project.When I start my app. in the
    browser it works well.First it redirects the login page and after I enter
    the password it redirects my administration page(again it's OK).I get the
    user details and add to Session object in login page and I get the details
    in administration page from Session object:
    string sUserType=Sessi on["UserType"].ToString();

    But if I try the same processes second time it displays an error like this:

    System.NullRefe renceException: Object reference not set to an instance of an
    object.

    string sUserType=Sessi on["UserType"].ToString();

    Any help will appreciated kindly.

    Thanks a lot.

    Salim





Working...