protected void Page_Load(object sender, EventArgs e)
    {
        if(IsPostBack) 
        if (HttpContext.Current.User.Identity.IsAuthenticated)
        {
            
            Session["UserName"] = HttpContext.Current.User.Identity.Name;
        }
    }
    <sessionState mode="InProc" cookieless="true" timeout="30" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=localhost;Trusted_Connection=yes;"/>