c# - Login View appears as logged but I'm not logged -


problem using login controller

i have problem login view on master page.

when login works fine, if close tab while or rebuild application session closed login view still showing session :/.

i have code in site.master

<div class="logindisplay">             <asp:loginview id="headloginview" runat="server" enableviewstate="false">                 <anonymoustemplate>                     [ <a href="~/login.aspx" id="headloginstatus" runat="server">log in</a>                     ]                 </anonymoustemplate>                 <loggedintemplate>                     bienvenido <span class="bold">                    <%-- headloginname--%>                         <asp:loginname id="membername" runat="server" />                     </span>! [                     <asp:loginstatus id="memberloginstatus" runat="server" logoutaction="redirect" logouttext="log out"                         logoutpageurl="~/login.aspx" onloggingout="headloginstatus_loggingout" />                     ]                 </loggedintemplate>             </asp:loginview>         </div> 

what i'm doing wrong?

i afraid don't make difference between following 2 concepts:

let's me try elaborate: asp.net session allows workaround stateless nature of http protocol. server emits cookie client , cookie send client on each subsequent request. server associates information in memory cookie. access information using session["somekey"] object. default information stored in memory although configure out of process. when rebuild application or timeout reached, memory on server freed , objects have stored disappear. configure timeout asp.net session use following:

<system.web>     <sessionstate timeout="30" /> </system.web> 

forms authentication on other hand different. uses cookies track authenticated users. cookie different asp.net session cookie. has different timeout value , configured independently:

<authentication mode="forms">   <forms     loginurl="/login"     timeout="30" /> </authentication> 

the forms authentication mechanism doesn't store in memory of server. tracks authenticated user stored inside cookie. if recompile application user still authenticated given timeout period defined in web.config. careful though slidingexpiration property renews timeout on each request.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -