last day (16 days later) » 

4:27 PM
2
A: Aspnet unexpected logout

TommySessionState timeouts have nothing at all to do with login timeouts. The users information for a login is stored in an encrypted cookie. Based on what you said your Authentication Type is, you need to change the setup of your ASP Identity in the StartUp class. app.UseCookieAuthentication(new C...

 
Thanks, that solve my problem.
Ok, now for some reason after a couple minutes inactive when i refresh page LoginCookie dissapear and logout user. What could cause this ?
 
@jony17 - it this across all browsers?
 
I will check. I'm testing mostly on chrome.
Yes, it happens on firefox and chrome. @Tommy
 
The only thing I can think of is to check if your server has the correct time on it. The cookie is time based and if the server has the incorrect time, it may be thinking that the cookie has expired. If you increase the ExpireTimeSpan to something crazy like 1 year, do you still get the same issue?
 
I already put in with 5 days and still logout. I will try something more crazy.
 
4:27 PM
I wouldn't think it would be that far off. :)
@jony17 - Where are you deploying this application to?
 
It's on a cloud service, with Windows 2012 .NET framework 4.5 e SQL Server 2012.
 
@jony17 Got it - please check my edit.
 
Still the same. This is my cookies: link
I have this
<system.web>
<sessionState timeout="2000"/>
<authentication mode="None"/>

<machineKey validationKey="7E1CC3996AA7E7BB83DA6CD7AFD4865462C9FC8BEFEA2861C7F92EF220CE66A176C29E04401142F7A62D245F7BB4E21BDA627DC5393BD1C789CA88280181FCF2" decryptionKey="42E4725E9F8475048C113E098D254C32580A911005A001E884B2112A810DFAF4" validation="SHA1" decryption="AES" />

<pages viewStateEncryptionMode="Never"/>
<compilation debug="true" targetFramework="4.5.1"/>
<httpRuntime targetFramework="4.5"/>
<customErrors mode="Off"/>
 
why does your login cookie say it expired last month?
 
it's 9 of december
            ExpireTimeSpan = System.TimeSpan.FromDays(60.0),
 
4:30 PM
oh - sorry, i was reading it as september 12
i think everything looks ok to me - does the same behavior occur when debugging locally?
 
I will try again locally
locally seems fine
This happen only after 5 or 6 minutes inactive
if i was navigate normally i never been logged out
 
5:26 PM
I am not sure what the issue could be. We have addressed the typical problems assocaited with the login cookie being rejected.
 

  last day (16 days later) »