After we have moved to Azure farm, I have implied Azure Session State Provider (redis) to my mvc application, But some Authorized pages redirect me to login page !! Is that because I use User.Identity.Name or User.Identity.IsAuthenticated in some actions!! Do I have to replace the User.Identity.Name with :

       // instead of below line
      //Boolean usern = User.Identity.IsAuthenticated;
      // is below lines :
        Boolean usern = "";
        object objValue = Session["usersession"];
        if (objValue != null)
           { usern = true;}
        else {usern = false;}

Is that right, if not why users redirect to login again sometimes !!!

Related posts

Recent Viewed