Z
Zulander
Hi, For some reason my session are expireing when the web browser
closes and User.Identity.IsAuthenticated is truning true,
I have a webcrontrol from login:
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim UserTicket As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, Login1.UserName, DateAndTime.Now,
DateAndTime.Now.AddSeconds(1), False, "WebUser",
FormsAuthentication.FormsCookiePath)
FormsAuthentication.Encrypt(UserTicket)
end sub
and in my secure page i have tha fallowing:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Not User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
Exit Sub
End If
did i do anything wrong ?
p.s: my authentication type is :form !
thank you
closes and User.Identity.IsAuthenticated is truning true,
I have a webcrontrol from login:
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim UserTicket As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, Login1.UserName, DateAndTime.Now,
DateAndTime.Now.AddSeconds(1), False, "WebUser",
FormsAuthentication.FormsCookiePath)
FormsAuthentication.Encrypt(UserTicket)
end sub
and in my secure page i have tha fallowing:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Not User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
Exit Sub
End If
did i do anything wrong ?
p.s: my authentication type is :form !
thank you