I am using form authentication , after some time the user logs out automatically ,it happens at uncertain time
below are my details of login
Dim isPersistent As Boolean = False
Dim ticket As FormsAuthenticationTicket = New FormsAuthenticationTicket(1, usernameforcookie, DateTime.Now, DateTime.Now.AddMinutes(30), isPersistent, FormsAuthentication.FormsCookiePath)
' Encrypt the ticket.
Dim encTicket As String = FormsAuthentication.Encrypt(ticket)
' Create the cookie.
Response.Cookies.Add(New HttpCookie(FormsAuthentication.FormsCookieName, encTicket))
' Redirect back to original URL.
Response.Redirect("~/Home.aspx")
usernameforcookie is the username of the user which I get from db to store matching username textbox, I do this cause i want to store the exact name in cookie
below are the web config details
<authentication mode="Forms">
<for ...
Go to the complete details ...